Commit 7195b429 authored by Jochen Roth's avatar Jochen Roth Committed by Oliver Bartsch
Browse files

[BUGFIX] Detect arm64 and switch selenium docker image

Currently acceptance tests do not work on arm64 (Apple M1)
due to the lack of support in the selenium docker image.

This has been fixed by detecting arm64 and switch to
arm64 compatible image (seleniarm/standalone-chromium).

Resolves: #97541
Releases: main, 11.5, 10.4
Change-Id: I531e7e1d7f0f11a1c6d850699eee3b4a9aa3e5d0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74502


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: default avatarJosef Glatz <josefglatz@gmail.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarJosef Glatz <josefglatz@gmail.com>
Reviewed-by: André Buchmann's avatarAndré Buchmann <andy.schliesser@gmail.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent 86c12357
......@@ -36,6 +36,7 @@ setUpDockerComposeDotEnv() {
echo "PHP_VERSION=${PHP_VERSION}"
echo "CHUNKS=${CHUNKS}"
echo "THISCHUNK=${THISCHUNK}"
echo "DOCKER_SELENIUM_IMAGE=${DOCKER_SELENIUM_IMAGE}"
} > .env
}
......@@ -329,6 +330,16 @@ MYSQL_VERSION="8.0"
POSTGRES_VERSION="10"
CHUNKS=0
THISCHUNK=0
DOCKER_SELENIUM_IMAGE="selenium/standalone-chrome:4.0.0-20211102"
# Detect arm64 and use a seleniarm image.
# In a perfect world selenium would have a arm64 integrated, but that is not on the horizon.
# So for the time being we have to use seleniarm image.
ARCH=$(uname -m)
if [ $ARCH = "arm64" ]; then
DOCKER_SELENIUM_IMAGE="seleniarm/standalone-chromium:4.1.2-20220227"
echo "Architecture" $ARCH "requires" $DOCKER_SELENIUM_IMAGE "to run acceptance tests."
fi
# Option parsing
# Reset in case getopts has been used previously in the shell
......
version: '2.3'
services:
chrome:
image: selenium/standalone-chrome:4.0.0-20211102
image: ${DOCKER_SELENIUM_IMAGE}
tmpfs:
- /dev/shm:rw,nosuid,nodev,noexec,relatime
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment