From 5d081a57e7fc9ba4c521af8f0c53c5481715307b Mon Sep 17 00:00:00 2001 From: Eike Starkmann Date: Mon, 29 Jul 2024 18:36:20 +0200 Subject: [PATCH 1/5] [FEATURE] Use paratest for composer script This needs to be done for runTests.sh as well Part of #1379 --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index dce00d8..af4b3bd 100644 --- a/composer.json +++ b/composer.json @@ -47,6 +47,7 @@ "typo3/cms-frontend": "^11.5.4 || ^12.4.2" }, "require-dev": { + "brianium/paratest": "^6.11", "ergebnis/composer-normalize": "^2.43.0", "friendsofphp/php-cs-fixer": "^3.64.0", "helmich/typo3-typoscript-lint": "^3.1.1", @@ -164,7 +165,7 @@ "ci:tests:create-directories": "mkdir -p .Build/public/typo3temp/var/tests", "ci:tests:functional": [ "@ci:tests:create-directories", - "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \\\"Running functional test suite {}\\\"; .Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml {}';" + "paratest -c Build/phpunit/FunctionalTests.xml Tests/Functional" ], "ci:tests:unit": "phpunit -c Build/phpunit/UnitTests.xml Tests/Unit", "ci:typoscript:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript", From 37480c5a2894d4c0bdb350075a9b1395b3b6595c Mon Sep 17 00:00:00 2001 From: Eike Starkmann Date: Tue, 30 Jul 2024 14:18:50 +0200 Subject: [PATCH 2/5] [TASK] run tests in separate processes Part of #1387 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index af4b3bd..0249425 100644 --- a/composer.json +++ b/composer.json @@ -165,7 +165,7 @@ "ci:tests:create-directories": "mkdir -p .Build/public/typo3temp/var/tests", "ci:tests:functional": [ "@ci:tests:create-directories", - "paratest -c Build/phpunit/FunctionalTests.xml Tests/Functional" + "paratest -f -c Build/phpunit/FunctionalTests.xml Tests/Functional" ], "ci:tests:unit": "phpunit -c Build/phpunit/UnitTests.xml Tests/Unit", "ci:typoscript:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript", From 7c4b9e8f1828ac6c52dd162342f276a798541f87 Mon Sep 17 00:00:00 2001 From: Eike Starkmann Date: Tue, 30 Jul 2024 16:35:47 +0200 Subject: [PATCH 3/5] Revert "[TASK] run tests in separate processes" This reverts commit 28892c988b075e57a6136d84f84c571191dea742. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0249425..af4b3bd 100644 --- a/composer.json +++ b/composer.json @@ -165,7 +165,7 @@ "ci:tests:create-directories": "mkdir -p .Build/public/typo3temp/var/tests", "ci:tests:functional": [ "@ci:tests:create-directories", - "paratest -f -c Build/phpunit/FunctionalTests.xml Tests/Functional" + "paratest -c Build/phpunit/FunctionalTests.xml Tests/Functional" ], "ci:tests:unit": "phpunit -c Build/phpunit/UnitTests.xml Tests/Unit", "ci:typoscript:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript", From 9fa810912401b38ef247dfd350774d84d2912565 Mon Sep 17 00:00:00 2001 From: Eike Starkmann Date: Tue, 30 Jul 2024 16:44:05 +0200 Subject: [PATCH 4/5] [FEATURE] use paratest in runTests.sh Part of #1379 --- Build/Scripts/runTests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index 99b6a60..f237c9e 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -546,7 +546,7 @@ case ${TEST_SUITE} in ;; functional) [ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Functional" - COMMAND=".Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}" + COMMAND=".Build/bin/paratest -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}" case ${DBMS} in mariadb) echo "Using driver: ${DATABASE_DRIVER}" @@ -574,6 +574,7 @@ case ${TEST_SUITE} in sqlite) CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite" ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + echo "{CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG=\"${XDEBUG_CONFIG}\" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND}" SUITE_EXIT_CODE=$? ;; esac From c75f100cbfa94ffff7ca4bca964469cabe7e82fe Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Tue, 17 Sep 2024 14:35:01 +0200 Subject: [PATCH 5/5] Use a higher minimal version of paratest --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index af4b3bd..0492437 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,7 @@ "typo3/cms-frontend": "^11.5.4 || ^12.4.2" }, "require-dev": { - "brianium/paratest": "^6.11", + "brianium/paratest": "^6.11.1", "ergebnis/composer-normalize": "^2.43.0", "friendsofphp/php-cs-fixer": "^3.64.0", "helmich/typo3-typoscript-lint": "^3.1.1",