Browse Source

Use phpunit from composer if available

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
tags/v26.0.0beta1
Carl Schwan 1 year ago
parent
commit
5b0f7f7501
No account linked to committer's email address
2 changed files with 12 additions and 7 deletions
  1. 5
    5
      .drone.yml
  2. 7
    2
      autotest.sh

+ 5
- 5
.drone.yml View File

@@ -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"

+ 7
- 2
autotest.sh View File

@@ -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


Loading…
Cancel
Save