diff --git a/.drone.yml b/.drone.yml index 4c372703337..cb20021cfd7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1842,7 +1842,7 @@ steps: XDEBUG_MODE: coverage commands: - phpenmod xdebug - - PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=NODB ./autotest.sh sqlite + - TEST_SELECTION=NODB ./autotest.sh sqlite - wget https://codecov.io/bash -O codecov.sh - bash codecov.sh -Z -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml @@ -1874,7 +1874,7 @@ steps: XDEBUG_MODE: coverage commands: - phpenmod xdebug - - PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=QUICKDB ./autotest.sh sqlite + - TEST_SELECTION=QUICKDB ./autotest.sh sqlite - wget https://codecov.io/bash -O codecov.sh - bash codecov.sh -Z -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml @@ -1916,7 +1916,7 @@ steps: commands: - phpenmod xdebug - ./tests/drone-wait-objectstore.sh - - PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=PRIMARY-s3 ./autotest.sh sqlite + - TEST_SELECTION=PRIMARY-s3 ./autotest.sh sqlite - wget https://codecov.io/bash -O codecov.sh - bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml @@ -1946,7 +1946,7 @@ steps: commands: - phpenmod xdebug - ./tests/drone-wait-objectstore.sh - - PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=PRIMARY-azure ./autotest.sh sqlite + - TEST_SELECTION=PRIMARY-azure ./autotest.sh sqlite - wget https://codecov.io/bash -O codecov.sh - bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml @@ -1978,7 +1978,7 @@ steps: commands: - phpenmod xdebug - service memcached restart - - PHPUNIT_EXE=build/integration/vendor/bin/phpunit ./autotest.sh sqlite tests/lib/Memcache/MemcachedTest.php + - ./autotest.sh sqlite tests/lib/Memcache/MemcachedTest.php - wget https://codecov.io/bash -O codecov.sh - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi" - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi" diff --git a/autotest.sh b/autotest.sh index f748cbbed12..84ffa0a1c78 100755 --- a/autotest.sh +++ b/autotest.sh @@ -30,8 +30,13 @@ if [ -z "$PHP_EXE" ]; then fi PHP=$(which "$PHP_EXE") if [ -z "$PHPUNIT_EXE" ]; then - PHPUNIT_EXE=phpunit + if [ -f "build/integration/vendor/bin/phpunit" ]; then + PHPUNIT_EXE="./build/integration/vendor/bin/phpunit" + else + PHPUNIT_EXE=phpunit + fi fi + PHPUNIT=$(which "$PHPUNIT_EXE") set -e @@ -56,7 +61,7 @@ else fi if ! [ -x "$PHPUNIT" ]; then - echo "phpunit executable not found, please install phpunit version >= 6.5" >&2 + echo "phpunit executable not found, please install phpunit version >= 9.0" >&2 exit 3 fi