diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index f55f17f6370de54da576c86bdf29f6d1b1d30e58..c729cbab58abb255ffca277cce424606dcc1f4e0 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -228,7 +228,7 @@ Options: - 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 + - unitRandom: PHP unit tests in random order, "-- --random-order-seed=<number>" to use specific seed -b <docker|podman> Container environment: @@ -323,12 +323,6 @@ Options: Send xdebug information to a different port than default 9003 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 gitlab core testing logs, too). Use that number to - replay the unit tests in that order. - -n Only with -s cgl|cglGit|cglHeader|cglHeaderGit Activate dry-run in CGL check that does not actively change files and only prints broken ones. @@ -352,10 +346,7 @@ Examples: ./Build/Scripts/runTests.sh -x -p 8.3 -- --filter filterByValueRecursiveCorrectlyFiltersArray # Run functional tests in phpunit with a filtered test method name in a specified file - # example will currently execute two tests, both of which start with the search term - ./Build/Scripts/runTests.sh -s functional -- \ - --filter datetimeInstanceCanBePersistedToDatabaseIfTypeIsExplicitlySpecified \ - typo3/sysext/core/Tests/Functional/Database/ConnectionTest.php + ./Build/Scripts/runTests.sh -s functional -- --filter aTestName path/to/fileTest.php # Run functional tests on postgres with xdebug, php 8.3 and execute a restricted set of tests ./Build/Scripts/runTests.sh -x -p 8.3 -s functional -d postgres typo3/sysext/core/Tests/Functional/Authentication @@ -408,7 +399,6 @@ PHP_XDEBUG_PORT=9003 ACCEPTANCE_HEADLESS=1 ACCEPTANCE_TOPIC="sets" EXTRA_TEST_OPTIONS="" -PHPUNIT_RANDOM="" CGLCHECK_DRY_RUN="" DATABASE_DRIVER="" CHUNKS=0 @@ -431,7 +421,7 @@ OPTIND=1 # Array for invalid options INVALID_OPTIONS=() # Simple option parsing based on getopts (! not getopt) -while getopts ":a:b:s:c:d:i:t:p:e:xy:o:nhug" OPT; do +while getopts ":a:b:s:c:d:i:t:p:e:xy:nhug" OPT; do case ${OPT} in s) TEST_SUITE=${OPTARG} @@ -481,9 +471,6 @@ while getopts ":a:b:s:c:d:i:t:p:e:xy:o:nhug" OPT; do y) PHP_XDEBUG_PORT=${OPTARG} ;; - o) - PHPUNIT_RANDOM="--random-order-seed=${OPTARG}" - ;; n) CGLCHECK_DRY_RUN="-n" ;; @@ -1084,7 +1071,7 @@ case ${TEST_SUITE} in SUITE_EXIT_CODE=$? ;; unitRandom) - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-random-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} bin/phpunit -c Build/phpunit/UnitTests.xml --order-by=random ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} "$@" + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-random-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} bin/phpunit -c Build/phpunit/UnitTests.xml --order-by=random ${EXTRA_TEST_OPTIONS} "$@" SUITE_EXIT_CODE=$? ;; update)