]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix autotest.sh execution
authorJoas Schilling <coding@schilljs.com>
Thu, 2 Feb 2023 10:58:55 +0000 (11:58 +0100)
committerJoas Schilling <coding@schilljs.com>
Thu, 2 Feb 2023 10:58:55 +0000 (11:58 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
autotest.sh

index 84ffa0a1c785c9b04077b556fc468c84f76848a7..09b983bbfa29707bbf780abb1705e13de6070f8a 100755 (executable)
@@ -30,15 +30,15 @@ if [ -z "$PHP_EXE" ]; then
 fi
 PHP=$(which "$PHP_EXE")
 if [ -z "$PHPUNIT_EXE" ]; then
-    if [ -f "build/integration/vendor/bin/phpunit" ]; then
-        PHPUNIT_EXE="./build/integration/vendor/bin/phpunit"
-    else
-        PHPUNIT_EXE=phpunit
-    fi
+       if [ -f build/integration/vendor/bin/phpunit ]; then
+               PHPUNIT_EXE="./build/integration/vendor/bin/phpunit"
+               PHPUNIT=$(readlink -f "$PHPUNIT_EXE")
+       else
+               PHPUNIT_EXE=phpunit
+               PHPUNIT=$(which "$PHPUNIT_EXE")
+       fi
 fi
 
-PHPUNIT=$(which "$PHPUNIT_EXE")
-
 set -e
 
 _XDEBUG_CONFIG=$XDEBUG_CONFIG
@@ -400,8 +400,8 @@ function execute_tests {
                echo "No coverage"
        fi
 
-       echo "$PHP" "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
-       "$PHP" "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
+       echo "$PHPUNIT" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
+       "$PHPUNIT" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
        RESULT=$?
 
        if [ "$PRIMARY_STORAGE_CONFIG" == "swift" ] ; then