summaryrefslogtreecommitdiffstats
path: root/run-tests.sh
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-07-22 14:31:11 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-07-31 16:55:39 +0200
commitcf7fc454ec1789603b360d69db83faf49b1e3ef1 (patch)
tree4f15ea013cb1af4513f4d5bba3369af5e24d90ac /run-tests.sh
parent1a39024190329a002be034d29979e1e8e5902607 (diff)
Add code coverage output
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'run-tests.sh')
-rwxr-xr-xrun-tests.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 23dd74ac4..35a23cbdc 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -35,12 +35,18 @@ cleanup() {
php -S "$ip:$port" -t public_html 2>/dev/null 1>&2 &
+mkdir -p test-coverage-data
+
while ! curl -s "$url" >/dev/null; do
sleep 0.1;
done
# run tests
-php index.php tools drop_all_tables || exit 1
-php index.php tools update_database || exit 1
-prove --ext .php --state=hot,slow,all,save --timer -o -e "php index.php tools test $url" -r "$@" application/test/tests/
+phpdbg -qrr index.php tools drop_all_tables || exit 1
+phpdbg -qrr index.php tools update_database || exit 1
+prove --ext .php --state=hot,slow,all,save --timer -o -e "phpdbg -qrr index.php tools test $url" -r "$@" application/test/tests/ || exit 1
+
+
+php index.php tools generate_coverage_report
+rm -rf test-coverage-data