From: Junio C Hamano Date: Wed, 3 Apr 2013 16:34:44 +0000 (-0700) Subject: Merge branch 'tr/valgrind' X-Git-Tag: v1.8.3-rc0~121 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/d3ea5826e4d27dea7bebf3b3029d183ddf31567a?ds=inline;hp=-c Merge branch 'tr/valgrind' Let us use not just memgrind but other *grind debuggers. * tr/valgrind: tests: notice valgrind error in test_must_fail tests --valgrind: provide a mode without --track-origins tests: parameterize --valgrind option t/README: --valgrind already implies -v --- d3ea5826e4d27dea7bebf3b3029d183ddf31567a diff --combined t/test-lib-functions.sh index 42c2258b4f,6766553c31..52510094ad --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@@ -91,10 -91,6 +91,10 @@@ q_to_tab () tr Q '\011' } +qz_to_tab_space () { + tr QZ '\011\040' +} + append_cr () { sed -e 's/$/Q/' | tr Q '\015' } @@@ -139,12 -135,12 +139,12 @@@ test_pause () fi } -# Call test_commit with the arguments " [ []]" +# Call test_commit with the arguments " [ [ []]]" # # This will commit a file with the given contents and the given commit -# message. It will also add a tag with as name. +# message, and tag the resulting commit with the given tag name. # -# Both and default to . +# , , and all default to . test_commit () { notick= && @@@ -172,7 -168,7 +172,7 @@@ test_tick fi && git commit $signoff -m "$1" && - git tag "$1" + git tag "${4:-$1}" } # Call test_merge with the arguments " ", where @@@ -540,6 -536,9 +540,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 }