From: Austin Clements Date: Thu, 12 May 2011 13:11:36 +0000 (-0400) Subject: test: Report test failures from test_expect_* X-Git-Tag: 0.9_rc1~31 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=003e718020b335f329f852ff1a3da23873d2ff6e;p=notmuch.git test: Report test failures from test_expect_* This makes test_expect_* return non-zero if the test fails, so the caller can make decisions based on this, such as setting test prerequisites. --- diff --git a/test/test-lib.sh b/test/test-lib.sh index b1b0db89..f8df6a5f 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -563,6 +563,7 @@ test_failure_ () { test_failure=$(($test_failure + 1)) test_failure_message_ "FAIL" "$@" test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; } + return 1 } test_failure_message_ () { @@ -584,6 +585,7 @@ test_known_broken_failure_ () { test_subtest_known_broken_= test_broken=$(($test_broken+1)) test_failure_message_ "BROKEN" "$@" + return 1 } test_debug () {