summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-05-21 18:53:35 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-21 18:53:35 +0200
commit1c3086f3ac2b8499b51280e0c75457dcc54c1a9b (patch)
tree29e00bcf7180ad122bf7451f1b4dd4b09af575dd
parent7fccbf5fd1919a9c8ae14d2f39a55de8eee64de5 (diff)
tests: Die early on db errors
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/errors/error_general.php1
-rwxr-xr-xrun-tests.sh4
2 files changed, 3 insertions, 2 deletions
diff --git a/application/errors/error_general.php b/application/errors/error_general.php
index 925c7751f..bc1a61973 100644
--- a/application/errors/error_general.php
+++ b/application/errors/error_general.php
@@ -38,6 +38,7 @@ if (class_exists("CI_Controller") && !isset($GLOBALS["is_error_page"])) {
foreach (explode("\n", $msg) as $line) {
echo "# $line\n";
}
+ exit(255);
} else {
// default CI error page
?>
diff --git a/run-tests.sh b/run-tests.sh
index db8d1511b..52c11d943 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -40,7 +40,7 @@ while ! curl -s "$url" >/dev/null; do
done
# run tests
-php index.php tools drop_all_tables
-php index.php tools update_database
+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/