[TASK] Execute tests via docker 89/57789/29
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 3 Aug 2018 10:00:52 +0000 (12:00 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 25 Oct 2018 17:50:19 +0000 (19:50 +0200)
The patch adds a new entry script Build/Script/runTests.sh
that hides away all the complexity of test suite execution
and docker details to execute everything that bamboo performs
locally via docker.

Use Build/Script/runTests.sh -h for an overview of available
options.

Example call to execute all functional tests on postgres DBMS
and sending xdebug output to a local (phpstorm) listening on
port 9000:
Build/Script/runTests.sh -s functional -d postgres -x

Change-Id: Idaaf0a90ed1a0ba0f31c1b7128dd9d564335e056
Resolves: #86746
Releases: master
Reviewed-on: https://review.typo3.org/57789
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Joerg Kummer <typo3@enobe.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Sybille Peters <sypets@gmx.de>
Tested-by: Sybille Peters <sypets@gmx.de>
Reviewed-by: Jonas Eberle <flightvision@googlemail.com>
Tested-by: Jonas Eberle <flightvision@googlemail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
.gitignore
Build/Scripts/duplicateExceptionCodeCheck.sh
Build/Scripts/runTests.sh [new file with mode: 0755]
Build/testing-docker/local/docker-compose.yml [new file with mode: 0644]
composer.json

index 6981b4c..e9467f8 100644 (file)
@@ -38,6 +38,7 @@ nbproject
 /Build/JavaScript
 /Build/typings/*
 !/Build/typings/no-def*
+/Build/testing-docker/local/.env
 /typo3/sysext/*/Resources/Private/TypeScript/*.js
 /typo3/sysext/*/Resources/Public/JavaScript/*.js.map
 #
index 8fda8c2..66ea79e 100755 (executable)
@@ -13,7 +13,8 @@ cd typo3/
 
 ignoreFiles=()
 # auto generated file, shouldn't be checked
-ignoreFiles+="sysext/core/Build/Configuration/Acceptance/Support/_generated/AcceptanceTesterActions.php"
+ignoreFiles+="sysext/core/Tests/Acceptance/Support/_generated/BackendTesterActions.php"
+ignoreFiles+="sysext/core/Tests/Acceptance/Support/_generated/InstallTesterActions.php"
 # a exception in here throws up an code from a previous exception
 ignoreFiles+="sysext/extbase/Classes/Core/Bootstrap.php"
 
diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh
new file mode 100755 (executable)
index 0000000..9c90cca
--- /dev/null
@@ -0,0 +1,473 @@
+#!/usr/bin/env bash
+
+#
+# TYPO3 core test runner based on docker and docker-compose.
+#
+
+# Function to write a .env file in Build/testing-docker/local
+# This is read by docker-compose and vars defined here are
+# used in Build/testing-docker/local/docker-compose.yml
+setUpDockerComposeDotEnv() {
+    # Delete possibly existing local .env file if exists
+    [ -e .env ] && rm .env
+    # Set up a new .env file for docker-compose
+    echo "COMPOSE_PROJECT_NAME=local" >> .env
+    # To prevent access rights of files created by the testing, the docker image later
+    # runs with the same user that is currently executing the script. docker-compose can't
+    # use $UID directly itself since it is a shell variable and not an env variable, so
+    # we have to set it explicitly here.
+    echo "HOST_UID=`id -u`" >> .env
+    # Your local home directory for composer and npm caching
+    echo "HOST_HOME=${HOME}" >> .env
+    # Your local user
+    echo "CORE_ROOT"=${CORE_ROOT} >> .env
+    echo "HOST_USER=${USER}" >> .env
+    echo "TEST_FILE=${TEST_FILE}" >> .env
+    echo "PHP_XDEBUG_ON=${PHP_XDEBUG_ON}" >> .env
+    echo "PHP_XDEBUG_PORT=${PHP_XDEBUG_PORT}" >> .env
+    echo "DOCKER_PHP_IMAGE=${DOCKER_PHP_IMAGE}" >> .env
+    echo "EXTRA_TEST_OPTIONS=${EXTRA_TEST_OPTIONS}" >> .env
+    echo "SCRIPT_VERBOSE=${SCRIPT_VERBOSE}" >> .env
+    echo "PHPUNIT_RANDOM=${PHPUNIT_RANDOM}" >> .env
+    echo "CGLCHECK_DRY_RUN=${CGLCHECK_DRY_RUN}" >> .env
+}
+
+# Load help text into $HELP
+read -r -d '' HELP <<EOF
+TYPO3 core test runner. Execute acceptance, unit, functional and other test suites in
+a docker based test environment. Handles execution of single test files, sending
+xdebug information to a local IDE and more.
+
+Successfully tested with docker version 18.06.1-ce and docker-compose 1.21.2.
+
+Usage: $0 [options] [file]
+
+No arguments: Run all unit tests with PHP 7.2
+
+Options:
+    -s <...>
+        Specifies which test suite to run
+            - acceptance: backend acceptance tests
+            - buildCss: execute scss to css builder
+            - buildJavascript: execute typescript to javascript builder
+            - cglGit: test and fix latest committed patch for CGL compliance
+            - cglAll: test and fix all core php files
+            - checkAnnotations: check php code for allowed annotations
+            - checkComposer: check composer.json files for version integrity
+            - checkCsvFixtures: test integrity of functional test csv fixtures
+            - checkExceptionCodes: test core for duplicate exception codes
+            - checkExtensionScannerRst: test all .rst files referenced by extension scanner exist
+            - checkFilePathLength: test core file paths do not exceed maximum length
+            - checkGitSubmodule: test core git has no sub modules defined
+            - checkPermissions: test some core files for correct executable bits
+            - checkRst: test .rst files for integrity
+            - checkXlf: test .xlf files for integrity
+            - composerInstall: "composer install", handy if host has no PHP, uses composer cache of users home
+            - composerValidate: "composer validate"
+            - functional: functional tests
+            - install: installation acceptance tests, only with -d mariadb|postgres|sqlite
+            - lint: PHP linting
+            - lintScss: SCSS linting
+            - lintTypescript: TS linting
+            - unit (default): PHP unit tests
+            - unitDeprecated: deprecated PHP unit tests
+            - unitJavascript: JavaScript unit tests
+            - unitRandom: PHP unit tests in random order, add -o <number> to use specific seed
+
+    -d <mariadb|mssql|postgres|sqlite>
+        Only with -s install|functional
+        Specifies on which DBMS tests are performed
+            - mariadb (default): use mariadb
+            - mssql: use mssql microsoft sql server
+            - postgres: use postgres
+            - sqlite: use sqlite
+
+    -p <7.2|7.3>
+        Specifies the PHP minor version to be used
+            - 7.2 (default): use PHP 7.2
+            - 7.3: use PHP 7.3
+
+    -e "<phpunit or codeception options>"
+        Only with -s functional|unit|unitDeprecated|unitRandom
+        Additional options to send to phpunit (unit & functional tests) or codeception (acceptance
+        tests). For phpunit, options starting with "--" must be added after options starting with "-".
+        Example -e "-v --filter canRetrieveValueWithGP" to enable verbose output AND filter tests
+        named "canRetrieveValueWithGP"
+
+    -x
+        Only with -s functional|unit|unitDeprecated|unitRandom
+        Send information to host instance for test or system under test break points. This is especially
+        useful if a local PhpStorm instance is listening on default xdebug port 9000. A different port
+        can be selected with -y
+
+    -y <port>
+        Send xdebug information to a different port than default 9000 if an IDE like PhpStorm
+        is not listening on default port.
+
+    -o <number>
+        Only with -s unitRandom
+        Set specific random seed to replay a random run in this order again. The phpunit randomizer
+        outputs the used seed at the end (in bamboo core testing logs, too). Use that number to
+        replay the unit tests in that order.
+
+    -n
+        Only with -s cglGit|cglAll
+        Activate dry-run in CGL check that does not actively change files and only prints broken ones.
+
+    -u
+        Update existing typo3gmbh/phpXY:latest docker images. Maintenance call to docker pull latest
+        versions of the main php images. The images are updated once in a while and only the youngest
+        ones are supported by core testing. Use this if weird test errors occur. Also removes obsolete
+        image versions of typo3gmbh/phpXY.
+
+    -v
+        Enable verbose script output. Shows variables and docker commands.
+
+    -h
+        Show this help.
+
+Examples:
+    # Run all core unit tests using PHP 7.2
+    ./Build/Scripts/runTests.sh
+    ./Build/Scripts/runTests.sh -s unit
+
+    # Run all core units tests and enable xdebug (have a PhpStorm listening on port 9000!)
+    ./Build/Scripts/runTests.sh -x
+
+    # Run unit tests in phpunit verbose mode with xdebug on PHP 7.3 and filter for test canRetrieveValueWithGP
+    ./Build/Scripts/runTests.sh -x -p 7.3 -e "-v --filter canRetrieveValueWithGP"
+
+    # Run unit tests with PHP 7.3 and have xdebug enabled
+    ./Build/Scripts/runTests.sh -x -p 7.3
+
+    # Run functional tests on postgres with xdebug, php 7.3 and execute a restricted set of tests
+    ./Build/Scripts/runTests.sh -x -p 7.3 -s functional -d postgres typo3/sysext/core/Tests/Functional/Authentication
+
+    # Run restricted set of backend acceptance tests
+    ./Build/Scripts/runTests.sh -s acceptance typo3/sysext/core/Tests/Acceptance/Backend/Login/BackendLoginCest.php
+
+    # Run installer tests of a new instance on sqlite
+    ./Build/Scripts/runTests.sh -s install -d sqlite
+EOF
+
+# Test if docker-compose exists, else exit out with error
+if ! type "docker-compose" > /dev/null; then
+  echo "This script relies on docker and docker-compose. Please install" >&2
+  exit 1
+fi
+
+# Go to the directory this script is located, so everything else is relative
+# to this dir, no matter from where this script is called.
+THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+cd "$THIS_SCRIPT_DIR" || exit 1
+
+# Go to directory that contains the local docker-compose.yml file
+cd ../testing-docker/local || exit 1
+
+# Option defaults
+CORE_ROOT="${PWD}/../../../"
+TEST_SUITE="unit"
+DBMS="mariadb"
+PHP_VERSION="7.2"
+PHP_XDEBUG_ON=0
+PHP_XDEBUG_PORT=9000
+EXTRA_TEST_OPTIONS=""
+SCRIPT_VERBOSE=0
+PHPUNIT_RANDOM="--order rand"
+CGLCHECK_DRY_RUN=""
+
+# Option parsing
+# Reset in case getopts has been used previously in the shell
+OPTIND=1
+# Array for invalid options
+INVALID_OPTIONS=();
+# Simple option parsing based on getopts (! not getopt)
+while getopts ":s:d:p:e:xy:o:nhuv" OPT; do
+    case ${OPT} in
+        s)
+            TEST_SUITE=${OPTARG}
+            ;;
+        d)
+            DBMS=${OPTARG}
+            ;;
+        p)
+            PHP_VERSION=${OPTARG}
+            ;;
+        e)
+            EXTRA_TEST_OPTIONS=${OPTARG}
+            ;;
+        x)
+            PHP_XDEBUG_ON=1
+            ;;
+        y)
+            PHP_XDEBUG_PORT=${OPTARG}
+            ;;
+        o)
+            PHPUNIT_RANDOM="--order :${OPTARG}"
+            ;;
+        n)
+            CGLCHECK_DRY_RUN="-n"
+            ;;
+        h)
+            echo "${HELP}"
+            exit 0
+            ;;
+        u)
+            TEST_SUITE=update
+            ;;
+        v)
+            SCRIPT_VERBOSE=1
+            ;;
+        \?)
+            INVALID_OPTIONS+=(${OPTARG})
+            ;;
+        :)
+            INVALID_OPTIONS+=(${OPTARG})
+            ;;
+    esac
+done
+
+# Exit on invalid options
+if [ ${#INVALID_OPTIONS[@]} -ne 0 ]; then
+    echo "Invalid option(s):" >&2
+    for I in "${INVALID_OPTIONS[@]}"; do
+        echo "-"${I} >&2
+    done
+    echo >&2
+    echo "${HELP}" >&2
+    exit 1
+fi
+
+# Move "7.2" to "php72", the latter is the docker container name
+DOCKER_PHP_IMAGE=`echo "php${PHP_VERSION}" | sed -e 's/\.//'`
+
+# Set $1 to first mass argument, this is the optional test file or test directory to execute
+shift $((OPTIND - 1))
+TEST_FILE=${1}
+
+if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+    set -x
+fi
+
+# Suite execution
+case ${TEST_SUITE} in
+    acceptance)
+        setUpDockerComposeDotEnv
+        docker-compose run prepare_acceptance_backend_mariadb10
+        docker-compose run acceptance_backend_mariadb10
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    buildCss)
+        setUpDockerComposeDotEnv
+        docker-compose run build_css
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    buildJavascript)
+        setUpDockerComposeDotEnv
+        docker-compose run build_javascript
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    cglGit)
+        setUpDockerComposeDotEnv
+        docker-compose run cgl_git
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    cglAll)
+        # Active dry-run for cglAll needs not "-n" but specific options
+        if [[ ! -z ${CGLCHECK_DRY_RUN} ]]; then
+            CGLCHECK_DRY_RUN="--dry-run --diff --diff-format udiff"
+        fi
+        setUpDockerComposeDotEnv
+        docker-compose run cgl_all
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    checkAnnotations)
+        setUpDockerComposeDotEnv
+        docker-compose run check_annotations
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    checkComposer)
+        setUpDockerComposeDotEnv
+        docker-compose run check_composer
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    checkCsvFixtures)
+        setUpDockerComposeDotEnv
+        docker-compose run check_csv_fixtures
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    checkExceptionCodes)
+        setUpDockerComposeDotEnv
+        docker-compose run check_exception_codes
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    checkExtensionScannerRst)
+        setUpDockerComposeDotEnv
+        docker-compose run check_extension_scanner_rst
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    checkFilePathLength)
+        setUpDockerComposeDotEnv
+        docker-compose run check_file_path_length
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    checkGitSubmodule)
+        setUpDockerComposeDotEnv
+        docker-compose run check_git_submodule
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    checkPermissions)
+        setUpDockerComposeDotEnv
+        docker-compose run check_permissions
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    checkRst)
+        setUpDockerComposeDotEnv
+        docker-compose run check_rst
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    checkXlf)
+        setUpDockerComposeDotEnv
+        docker-compose run check_xlf
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    composerInstall)
+        setUpDockerComposeDotEnv
+        docker-compose run composer_install
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    composerValidate)
+        setUpDockerComposeDotEnv
+        docker-compose run composer_validate
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    functional)
+        setUpDockerComposeDotEnv
+        case ${DBMS} in
+            mariadb)
+                docker-compose run prepare_functional_mariadb10
+                docker-compose run functional_mariadb10
+                SUITE_EXIT_CODE=$?
+                ;;
+            mssql)
+                docker-compose run prepare_functional_mssql2017cu9
+                docker-compose run functional_mssql2017cu9
+                SUITE_EXIT_CODE=$?
+                ;;
+            postgres)
+                docker-compose run prepare_functional_postgres10
+                docker-compose run functional_postgres10
+                SUITE_EXIT_CODE=$?
+                ;;
+            sqlite)
+                docker-compose run prepare_functional_sqlite
+                docker-compose run functional_sqlite
+                SUITE_EXIT_CODE=$?
+                ;;
+            *)
+                echo "Invalid -d option argument ${DBMS}" >&2
+                echo >&2
+                echo "${HELP}" >&2
+                exit 1
+        esac
+        docker-compose down
+        ;;
+    install)
+        setUpDockerComposeDotEnv
+        case ${DBMS} in
+            mariadb)
+                docker-compose run prepare_acceptance_install_mariadb10
+                docker-compose run acceptance_install_mariadb10
+                SUITE_EXIT_CODE=$?
+                ;;
+            postgres)
+                docker-compose run prepare_acceptance_install_postgres10
+                docker-compose run acceptance_install_postgres10
+                SUITE_EXIT_CODE=$?
+                ;;
+            sqlite)
+                docker-compose run prepare_acceptance_install_sqlite
+                docker-compose run acceptance_install_sqlite
+                SUITE_EXIT_CODE=$?
+                ;;
+            *)
+                echo "Invalid -d option argument ${DBMS}" >&2
+                echo >&2
+                echo "${HELP}" >&2
+                exit 1
+        esac
+        docker-compose down
+        ;;
+    lint)
+        setUpDockerComposeDotEnv
+        docker-compose run lint
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    lintScss)
+        setUpDockerComposeDotEnv
+        docker-compose run lint_scss
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    lintTypescript)
+        setUpDockerComposeDotEnv
+        docker-compose run lint_typescript
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    unit)
+        setUpDockerComposeDotEnv
+        docker-compose run unit
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    unitDeprecated)
+        setUpDockerComposeDotEnv
+        docker-compose run unitDeprecated
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    unitJavascript)
+        setUpDockerComposeDotEnv
+        docker-compose run unitJavascript
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    unitRandom)
+        setUpDockerComposeDotEnv
+        docker-compose run unitRandom
+        SUITE_EXIT_CODE=$?
+        docker-compose down
+        ;;
+    update)
+        # pull typo3gmbh/phpXY:latest versions of those ones that exist locally
+        docker images typo3gmbh/php*:latest --format "{{.Repository}}:latest" | xargs -I {} docker pull {}
+        # remove "dangling" typo3gmbh/phpXY images (those tagged as <none>)
+        docker images typo3gmbh/php* --filter "dangling=true" --format "{{.ID}}" | xargs -I {} docker rmi {}
+        ;;
+    *)
+        echo "Invalid -s option argument ${TEST_SUITE}" >&2
+        echo >&2
+        echo "${HELP}" >&2
+        exit 1
+esac
+
+exit $SUITE_EXIT_CODE
diff --git a/Build/testing-docker/local/docker-compose.yml b/Build/testing-docker/local/docker-compose.yml
new file mode 100644 (file)
index 0000000..4917f5d
--- /dev/null
@@ -0,0 +1,809 @@
+version: '2.3'
+services:
+  chrome:
+    image: selenium/standalone-chrome:3.12
+
+  mariadb10:
+    image: mariadb:10
+    environment:
+      MYSQL_ROOT_PASSWORD: funcp
+    tmpfs:
+      - /var/lib/mysql/:rw,noexec,nosuid
+
+  mssql2017cu9:
+    image: microsoft/mssql-server-linux:2017-CU9
+    environment:
+      ACCEPT_EULA: Y
+      SA_PASSWORD: "Test1234!"
+      MSSQL_PID: Developer
+    # No tmpfs setup here since mssql fails on tmpfs o_direct.
+    # This makes mssql sloooow for functionals.
+
+  postgres10:
+    image: postgres:10
+    environment:
+      POSTGRES_PASSWORD: funcp
+      POSTGRES_USER: ${HOST_USER}
+    tmpfs:
+      - /var/lib/postgresql/data:rw,noexec,nosuid
+
+  web:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    stop_grace_period: 1s
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+    command: php -n -c /etc/php/cli-no-xdebug/php.ini -S web:8000 -t ${CORE_ROOT}
+
+  redis4:
+    image: redis:4-alpine
+
+  memcached1-5:
+    image: memcached:1.5-alpine
+
+
+  prepare_acceptance_backend_mariadb10:
+    image: alpine:3.8
+    links:
+      - mariadb10
+      - chrome
+      - web
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        echo Waiting for database start...;
+        while ! nc -z mariadb10 3306; do
+          sleep 1;
+        done;
+        echo Database is up;
+      "
+  acceptance_backend_mariadb10:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    environment:
+      typo3DatabaseName: func_test
+      typo3DatabaseUsername: root
+      typo3DatabasePassword: funcp
+      typo3DatabaseHost: mariadb10
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        mkdir -p typo3temp/var/tests/ \
+          && ./bin/codecept run Backend -d -c typo3/sysext/core/Tests/codeception.yml ${TEST_FILE}
+      "
+
+  prepare_acceptance_install_mariadb10:
+    image: alpine:3.8
+    links:
+      - mariadb10
+      - chrome
+      - web
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        echo Waiting for database start...;
+        while ! nc -z mariadb10 3306; do
+          sleep 1;
+        done;
+        echo Database is up;
+      "
+  acceptance_install_mariadb10:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    environment:
+      typo3InstallMysqlDatabaseHost: mariadb10
+      typo3InstallMysqlDatabaseName: func_test
+      typo3InstallMysqlDatabaseUsername: root
+      typo3InstallMysqlDatabasePassword: funcp
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        mkdir -p typo3temp/var/tests/ \
+          && ./bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=mysql
+      "
+
+  prepare_acceptance_install_postgres10:
+    image: alpine:3.8
+    links:
+      - postgres10
+      - chrome
+      - web
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        echo Waiting for database start...;
+        while ! nc -z postgres10 5432; do
+          sleep 1;
+        done;
+        echo Database is up;
+      "
+  acceptance_install_postgres10:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    environment:
+      typo3InstallPostgresqlDatabaseHost: postgres10
+      typo3InstallPostgresqlDatabaseName: ${HOST_USER}
+      typo3InstallPostgresqlDatabaseUsername: ${HOST_USER}
+      typo3InstallPostgresqlDatabasePassword: funcp
+    working_dir: ${CORE_ROOT}
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        mkdir -p typo3temp/var/tests/ \
+          && ./bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=postgresql
+      "
+
+  prepare_acceptance_install_sqlite:
+    image: alpine:3.8
+    links:
+      - chrome
+      - web
+    command: >
+      /bin/sh -c "
+        sleep 1;
+      "
+  acceptance_install_sqlite:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        mkdir -p typo3temp/var/tests/ \
+          && ./bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=sqlite
+      "
+
+  build_css:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}/Build
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        yarn install \
+          && ./node_modules/grunt/bin/grunt css
+      "
+
+  build_javascript:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}/Build
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        yarn install \
+          && ./node_modules/grunt/bin/grunt scripts
+      "
+
+  cgl_git:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        Build/Scripts/cglFixMyCommit.sh ${CGLCHECK_DRY_RUN};
+      "
+
+  cgl_all:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        php -n -c /etc/php/cli-no-xdebug/php.ini bin/php-cs-fixer fix -v ${CGLCHECK_DRY_RUN} --path-mode intersection \
+          --config=Build/.php_cs typo3/
+      "
+
+  check_annotations:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        Build/Scripts/annotationChecker.php;
+      "
+
+  check_composer:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        Build/Scripts/checkIntegrityComposer.php;
+      "
+
+  check_csv_fixtures:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        Build/Scripts/checkIntegrityCsvFixtures.php;
+      "
+
+  check_exception_codes:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        Build/Scripts/duplicateExceptionCodeCheck.sh;
+      "
+
+  check_extension_scanner_rst:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        Build/Scripts/extensionScannerRstFileReferences.php;
+      "
+
+  check_file_path_length:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        Build/Scripts/maxFilePathLength.sh;
+      "
+
+  check_git_submodule:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        if [ `git submodule status 2>&1 | wc -l` -ne 0 ]; then
+          echo \"Found a submodule definition in repository\";
+          exit 1;
+        fi
+      "
+
+  check_permissions:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        Build/Scripts/checkFilePermissions.sh;
+      "
+
+  check_rst:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        Build/Scripts/validateRstFiles.php;
+      "
+
+  check_xlf:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        Build/Scripts/xlfcheck.sh;
+      "
+
+  composer_install:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        composer install;
+      "
+
+  composer_validate:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        composer validate;
+      "
+
+  prepare_functional_mariadb10:
+    image: alpine:3.8
+    links:
+      - mariadb10
+      - redis4
+      - memcached1-5
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        echo Waiting for database start...;
+        while ! nc -z mariadb10 3306; do
+          sleep 1;
+        done;
+        echo Database is up;
+      "
+  functional_mariadb10:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    environment:
+      typo3DatabaseName: func_test
+      typo3DatabaseUsername: root
+      typo3DatabasePassword: funcp
+      typo3DatabaseHost: mariadb10
+      typo3TestingRedisHost: redis4
+      typo3TestingMemcachedHost: memcached1-5
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        php -v | grep '^PHP'
+        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
+          php -n -c /etc/php/cli-no-xdebug/php.ini \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
+        else
+          DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
+          XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
+        fi
+      "
+
+  prepare_functional_mssql2017cu9:
+    image: alpine:3.8
+    links:
+      - mssql2017cu9
+      - redis4
+      - memcached1-5
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        echo Waiting for database start...;
+        while ! nc -z mssql2017cu9 1433; do
+          sleep 1;
+        done;
+        echo Database is up;
+      "
+  functional_mssql2017cu9:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    environment:
+      typo3DatabaseDriver: sqlsrv
+      typo3DatabaseName: func
+      typo3DatabasePassword: "Test1234!"
+      typo3DatabaseUsername: SA
+      typo3DatabasePort: 1433
+      typo3DatabaseCharset: utf-8
+      typo3DatabaseHost: mssql2017cu9
+      typo3TestingRedisHost: redis4
+      typo3TestingMemcachedHost: memcached1-5
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        php -v | grep '^PHP'
+        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
+          php -n -c /etc/php/cli-no-xdebug/php.ini \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-mssql ${TEST_FILE};
+        else
+          DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
+          XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-mssql ${TEST_FILE};
+        fi
+      "
+
+  prepare_functional_postgres10:
+    image: alpine:3.8
+    links:
+      - postgres10
+      - redis4
+      - memcached1-5
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        echo Waiting for database start...;
+        while ! nc -z postgres10 5432; do
+          sleep 1;
+        done;
+        echo Database is up;
+      "
+  functional_postgres10:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    environment:
+      typo3DatabaseDriver: pdo_pgsql
+      typo3DatabaseName: bamboo
+      typo3DatabaseUsername: ${HOST_USER}
+      typo3DatabaseHost: postgres10
+      typo3DatabasePassword: funcp
+      typo3TestingRedisHost: redis4
+      typo3TestingMemcachedHost: memcached1-5
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        php -v | grep '^PHP'
+        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
+          php -n -c /etc/php/cli-no-xdebug/php.ini \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-postgres ${TEST_FILE};
+        else
+          DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
+          XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-postgres ${TEST_FILE};
+        fi
+      "
+
+  prepare_functional_sqlite:
+    image: alpine:3.8
+    links:
+      - redis4
+      - memcached1-5
+    command: >
+      /bin/sh -c "
+        sleep 1;
+      "
+  functional_sqlite:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+      # @todo: sqlite DB is currently written to functional-doc-root (typo3temp/var/test-functional-xy/) /test.sqlite
+      # This directory is mapped to the local dir, so it is hard disk and not a tmpfs. sqlite functionals would speed
+      # up significantly if typo3/testing-framework would accept an environment variable to locate test.sqlite file on
+      # some tmpfs mount. Note this is not an issue within bamboo since in bamboo the entire core checkout is a tmpfs already.
+    environment:
+      typo3DatabaseDriver: pdo_sqlite
+      typo3TestingRedisHost: redis4
+      typo3TestingMemcachedHost: memcached1-5
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        php -v | grep '^PHP'
+        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
+          php -n -c /etc/php/cli-no-xdebug/php.ini \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-sqlite ${TEST_FILE};
+        else
+          DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
+          XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-sqlite ${TEST_FILE};
+        fi
+      "
+
+  lint:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        php -v | grep '^PHP'
+        find typo3/ -name \\*.php -print0 | xargs -0 -n1 -P4 php -n -c /etc/php/cli-no-xdebug/php.ini -l >/dev/null
+      "
+
+  lint_scss:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}/Build
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        yarn install \
+          && ./node_modules/grunt/bin/grunt stylelint;
+      "
+
+  lint_typescript:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+    - ${CORE_ROOT}:${CORE_ROOT}
+    - ${HOST_HOME}:${HOST_HOME}
+    - /etc/passwd:/etc/passwd:ro
+    - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}/Build
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        yarn install \
+          && ./node_modules/grunt/bin/grunt tslint;
+      "
+
+  unit:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        php -v | grep '^PHP'
+        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
+          php -n -c /etc/php/cli-no-xdebug/php.ini \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
+        else
+          DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
+          XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
+        fi
+      "
+
+  unitDeprecated:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        php -v | grep '^PHP'
+        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
+          php -n -c /etc/php/cli-no-xdebug/php.ini \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
+        else
+          DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
+          XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
+            bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE};
+        fi
+      "
+
+  unitJavascript:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}/Build
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        yarn install \
+          && cd .. \
+          && Build/node_modules/karma/bin/karma start \
+            vendor/typo3/testing-framework/Resources/Core/Build/Configuration/JSUnit/karma.conf.js --single-run
+      "
+
+  unitRandom:
+    image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
+    user: ${HOST_UID}
+    volumes:
+      - ${CORE_ROOT}:${CORE_ROOT}
+      - ${HOST_HOME}:${HOST_HOME}
+      - /etc/passwd:/etc/passwd:ro
+      - /etc/group:/etc/group:ro
+    working_dir: ${CORE_ROOT}
+    command: >
+      /bin/sh -c "
+        if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
+          set -x
+        fi
+        php -v | grep '^PHP'
+        if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
+          php -n -c /etc/php/cli-no-xdebug/php.ini \
+            bin/phpunit-randomizer -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} ${TEST_FILE};
+        else
+          DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
+          XDEBUG_CONFIG=\"remote_port=${PHP_XDEBUG_PORT} remote_enable=1 remote_host=$${DOCKER_HOST}\" \
+            bin/phpunit-randomizer -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} ${TEST_FILE};
+        fi
+      "
index a072db0..942394b 100644 (file)
                }
        },
        "scripts": {
-               "test:php:unit": [
-                       "@php -v",
-                       "@php vendor/phpunit/phpunit/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml"
-               ],
-               "test": [
-                       "@test:php:unit"
-               ],
                "gerrit:setup": [
                        "@gerrit:setup:commitMessageHook:enable",
                        "@gerrit:setup:preCommitHook:enable"
                ]
        },
        "scripts-descriptions": {
-               "test:php:unit": "Run all PHP unit tests",
-               "test": "Run all tests",
                "gerrit:setup": "Enable all the git hooks needed to make contribution easy",
                "gerrit:setup:commitMessageHook:enable": "Enable the commit message hook needed for gerrit",
                "gerrit:setup:preCommitHook:enable": "Enable pre commit hook to run some checks locally",