Report overall status after running all suites

This commit is contained in:
Adam Harrison committed 2015-04-22 16:46:22 +01:00
1 parent 5e01021cba
commit d850ea41a2
2 files changed
+23

No files matched your search

+8
View File
@@ -52,6 +52,14 @@ greyly () {
colourise '0;37' "$@"
}
redly() {
colourise '1;31' "$@"
}
greenly() {
colourise '1;32' "$@"
}
run_on() {
host=$1
shift 1
+15
View File
@@ -9,6 +9,21 @@ if ! bash ./sanity_check.sh; then
fi
whitely echo ...ok
# Modified version of _assert_cleanup from assert.sh that
# prints overall status
check_test_status() {
if [ $? -ne 0 ]; then
redly echo "---= !!!ABNORMAL TEST TERMINATION!!! =---"
elif [ $tests_suite_status -ne 0 ]; then
redly echo "---= !!!SUITE FAILURES - SEE ABOVE FOR DETAILS!!! =---"
exit $tests_suite_status
else
greenly echo "---= ALL SUITES PASSED =---"
fi
}
# Overwrite assert.sh _assert_cleanup trap with our own
trap check_test_status EXIT
for t in *_test.sh; do
echo
greyly echo "---= Running $t =---"