summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-03-03 19:33:37 +0100
committerFlorian Pritz <bluewind@xinu.at>2017-03-03 19:34:42 +0100
commitb0b284add2f55633b5a68fbc8c373dd70954b700 (patch)
treef2ef18cd6a161b9755aed98f8cb034b42e38f1bd
parent2fab22fc34561d037e8d41fed2f70e0d3eff205d (diff)
run-tests.sh: Only use phpdbg when coverage information is gathered
For some reason phpdbg crashes for me right now so this is a quick workaround to get the tests to run again. Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xrun-tests.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/run-tests.sh b/run-tests.sh
index a65800fb0..89db85ee9 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -32,11 +32,16 @@ cleanup() {
mkdir -p test-coverage-data
+php=(php)
+if ((COLLECT_COVERAGE)); then
+ php=(phpdbg -qrr)
+fi
+
# run tests
-phpdbg -qrr index.php tools drop_all_tables || exit 1
-phpdbg -qrr index.php tools update_database || exit 1
+"${php[@]}" index.php tools drop_all_tables || exit 1
+"${php[@]}" index.php tools update_database || exit 1
-prove --ext .php --state=failed,save --timer --comments --exec 'phpdbg -qrr index.php tools test' --recurse "${@:-application/test/tests/}" || exit 1
+prove --ext .php --state=failed,save --timer --comments --exec "${php[*]} index.php tools test" --recurse "${@:-application/test/tests/}" || exit 1
if (($COLLECT_COVERAGE)); then
php index.php tools generate_coverage_report