summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2010-08-31 12:10:55 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-08-31 11:09:21 -0700
commit5c8e141414058430155ea179bce38ceb8d750c5d (patch)
tree3e110851a5140dcb89a2a9eaff48d026f72d8202 /t
parenttests: make test_must_fail fail on missing commands (diff)
downloadtgif-5c8e141414058430155ea179bce38ceb8d750c5d.tar.xz
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 <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/test-lib.sh7
1 files changed, 6 insertions, 1 deletions
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.