From: Jonathan Nieder Date: Tue, 31 Aug 2010 17:10:55 +0000 (-0500) Subject: tests: make test_might_fail more verbose X-Git-Tag: v1.7.3-rc1~12^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5c8e141414058430155ea179bce38ceb8d750c5d tests: make test_might_fail more verbose Let test_might_fail say something about its failures for consistency with test_must_fail. Cc: Jeff King Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/t/test-lib.sh b/t/test-lib.sh index dbb13af33e..16ceb5316f 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -618,7 +618,12 @@ test_must_fail () { test_might_fail () { "$@" - test $? -ge 0 -a $? -le 129 -o $? -gt 192 + exit_code=$? + if test $exit_code -gt 129 -a $exit_code -le 192; then + echo >&2 "test_might_fail: died by signal: $*" + return 1 + fi + return 0 } # test_cmp is a helper function to compare actual and expected output.