aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-02-24 02:45:49 -0500
committerJunio C Hamano <gitster@pobox.com>2016-02-25 13:51:47 -0800
commitf3ed0b372d990eade2e4727f17d9ee40003badb1 (patch)
treeb5e469ecc9cc0ff511fb5ebd91433041808c7372 /t
parent9ff18faf2f8578ed1cbc4376b594fa7ff22c9085 (diff)
downloadgit-f3ed0b372d990eade2e4727f17d9ee40003badb1.tar.gz
git-f3ed0b372d990eade2e4727f17d9ee40003badb1.tar.xz
test_must_fail: report number of unexpected signal
If a command is marked as test_must_fail but dies with a signal, we consider that a problem and report the error to stderr. However, we don't say _which_ signal; knowing that can make debugging easier. Let's share as much as we know. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/test-lib-functions.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index c64e5a502..8d99eb303 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -617,7 +617,7 @@ test_must_fail () {
return 0
elif test $exit_code -gt 129 && test $exit_code -le 192
then
- echo >&2 "test_must_fail: died by signal: $*"
+ echo >&2 "test_must_fail: died by signal $(($exit_code - 128)): $*"
return 1
elif test $exit_code -eq 127
then