Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-05-15 12:44:51 +0300
committerLukas Reschke <lukas@owncloud.com>2015-05-15 12:57:40 +0300
commit8b0c223d6e55a7aeec03949bf01cbb89246960aa (patch)
treebbf6d34bd696a3a9da66736027b81bd268412bd0 /autotest.sh
parente3ac4d7b370896c3b03baf188f059d229603e8de (diff)
Add support for facade binary scripts
Fixes https://github.com/owncloud/core/issues/16296
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/autotest.sh b/autotest.sh
index b01bdda0896..d34bd48b49e 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -53,7 +53,14 @@ if ! [ -x "$PHPUNIT" ]; then
exit 3
fi
-PHPUNIT_VERSION=$("$PHP" "$PHPUNIT" --version | cut -d" " -f2)
+# PHPUnit might also be installed via a facade binary script
+if [[ "$PHPUNIT" =~ \.phar$ ]]; then
+ PHPUNIT="$PHP $PHPUNIT"
+else
+ PHPUNIT="$PHPUNIT"
+fi
+
+PHPUNIT_VERSION=$($PHPUNIT --version | cut -d" " -f2)
PHPUNIT_MAJOR_VERSION=$(echo "$PHPUNIT_VERSION" | cut -d"." -f1)
PHPUNIT_MINOR_VERSION=$(echo "$PHPUNIT_VERSION" | cut -d"." -f2)
@@ -160,11 +167,11 @@ function execute_tests {
mkdir "coverage-html-$1"
"$PHP" -f enable_all.php | grep -i -C9999 error && echo "Error during setup" && exit 101
if [ -z "$NOCOVERAGE" ]; then
- "$PHP" "$PHPUNIT" --configuration phpunit-autotest.xml --log-junit "autotest-results-$1.xml" --coverage-clover "autotest-clover-$1.xml" --coverage-html "coverage-html-$1" "$2" "$3"
+ $PHPUNIT --configuration phpunit-autotest.xml --log-junit "autotest-results-$1.xml" --coverage-clover "autotest-clover-$1.xml" --coverage-html "coverage-html-$1" "$2" "$3"
RESULT=$?
else
echo "No coverage"
- "$PHP" "$PHPUNIT" --configuration phpunit-autotest.xml --log-junit "autotest-results-$1.xml" "$2" "$3"
+ $PHPUNIT --configuration phpunit-autotest.xml --log-junit "autotest-results-$1.xml" "$2" "$3"
RESULT=$?
fi
}