Skip to content

Commit b2be49a

Browse files
committed
Use phpunit from composer if available
Signed-off-by: Carl Schwan <[email protected]>
1 parent 0feac8f commit b2be49a

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.drone.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,7 @@ steps:
18461846
XDEBUG_MODE: coverage
18471847
commands:
18481848
- phpenmod xdebug
1849-
- PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=NODB ./autotest.sh sqlite
1849+
- TEST_SELECTION=NODB ./autotest.sh sqlite
18501850
- wget https://codecov.io/bash -O codecov.sh
18511851
- bash codecov.sh -Z -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
18521852

@@ -1878,7 +1878,7 @@ steps:
18781878
XDEBUG_MODE: coverage
18791879
commands:
18801880
- phpenmod xdebug
1881-
- PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=QUICKDB ./autotest.sh sqlite
1881+
- TEST_SELECTION=QUICKDB ./autotest.sh sqlite
18821882
- wget https://codecov.io/bash -O codecov.sh
18831883
- bash codecov.sh -Z -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
18841884

@@ -1920,7 +1920,7 @@ steps:
19201920
commands:
19211921
- phpenmod xdebug
19221922
- ./tests/drone-wait-objectstore.sh
1923-
- PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=PRIMARY-s3 ./autotest.sh sqlite
1923+
- TEST_SELECTION=PRIMARY-s3 ./autotest.sh sqlite
19241924
- wget https://codecov.io/bash -O codecov.sh
19251925
- bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
19261926

@@ -1950,7 +1950,7 @@ steps:
19501950
commands:
19511951
- phpenmod xdebug
19521952
- ./tests/drone-wait-objectstore.sh
1953-
- PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=PRIMARY-azure ./autotest.sh sqlite
1953+
- TEST_SELECTION=PRIMARY-azure ./autotest.sh sqlite
19541954
- wget https://codecov.io/bash -O codecov.sh
19551955
- bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
19561956

@@ -1982,7 +1982,7 @@ steps:
19821982
commands:
19831983
- phpenmod xdebug
19841984
- service memcached restart
1985-
- PHPUNIT_EXE=build/integration/vendor/bin/phpunit ./autotest.sh sqlite tests/lib/Memcache/MemcachedTest.php
1985+
- ./autotest.sh sqlite tests/lib/Memcache/MemcachedTest.php
19861986
- wget https://codecov.io/bash -O codecov.sh
19871987
- 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"
19881988
- 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"

autotest.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ PHP=$(which "$PHP_EXE")
3232
if [ -z "$PHPUNIT_EXE" ]; then
3333
PHPUNIT_EXE=phpunit
3434
fi
35-
PHPUNIT=$(which "$PHPUNIT_EXE")
35+
36+
if [ -f "./build/integration/vendor/bin/phpunit" ]; then
37+
PHPUNIT=$(which "./build/integration/vendor/bin/phpunit")
38+
else
39+
PHPUNIT=$(which "$PHPUNIT_EXE")
40+
fi
3641

3742
set -e
3843

0 commit comments

Comments
 (0)