summaryrefslogtreecommitdiff
path: root/t/test-lib-functions.sh
diff options
context:
space:
mode:
authorThomas Rast <trast@inf.ethz.ch>2013-03-31 08:37:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-01 14:45:45 (GMT)
commiteeb69131ed7f3cb7a191d5bf0e3ce8fdd726a539 (patch)
tree4be4bdf8bd11633da400b7b2b95efee2c793858b /t/test-lib-functions.sh
parent95d9d5ec75d3549f00cac29cd33be899cfb4693a (diff)
downloadgit-eeb69131ed7f3cb7a191d5bf0e3ce8fdd726a539.zip
git-eeb69131ed7f3cb7a191d5bf0e3ce8fdd726a539.tar.gz
git-eeb69131ed7f3cb7a191d5bf0e3ce8fdd726a539.tar.bz2
tests: notice valgrind error in test_must_fail
We tell valgrind to return 126 if it notices that something is wrong, but we did not actually handle this in test_must_fail, leading to false negatives. Catch and report it. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index fa62d01..6766553 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -536,6 +536,9 @@ test_must_fail () {
elif test $exit_code = 127; then
echo >&2 "test_must_fail: command not found: $*"
return 1
+ elif test $exit_code = 126; then
+ echo >&2 "test_must_fail: valgrind error: $*"
+ return 1
fi
return 0
}