diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-06-29 23:41:55 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-06-29 23:41:55 (GMT) |
commit | f5cfd52f7b85d693b3782297819981a502a0135b (patch) | |
tree | 18ee132a84ab97f275a35b595b6a713611861f6f /t/test-lib.sh | |
parent | f696543dad6c7ba27b0c4fab167a5687263a9ba0 (diff) | |
parent | b586744a864cf4d6886d6436d559302123b01fae (diff) | |
download | git-f5cfd52f7b85d693b3782297819981a502a0135b.zip git-f5cfd52f7b85d693b3782297819981a502a0135b.tar.gz git-f5cfd52f7b85d693b3782297819981a502a0135b.tar.bz2 |
Merge branch 'maint-1.7.5' into maint
* maint-1.7.5:
test: skip clean-up when running under --immediate mode
"branch -d" can remove more than one branches
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 8c57a00..df25f17 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -446,9 +446,14 @@ test_debug () { test_run_ () { test_cleanup=: + expecting_failure=$2 eval >&3 2>&4 "$1" eval_ret=$? - eval >&3 2>&4 "$test_cleanup" + + if test -z "$immediate" || test $eval_ret = 0 || test -n "$expecting_failure" + then + eval >&3 2>&4 "$test_cleanup" + fi if test "$verbose" = "t" && test -n "$HARNESS_ACTIVE"; then echo "" fi @@ -497,7 +502,7 @@ test_expect_failure () { if ! test_skip "$@" then say >&3 "checking known breakage: $2" - test_run_ "$2" + test_run_ "$2" expecting_failure if [ "$?" = 0 -a "$eval_ret" = 0 ] then test_known_broken_ok_ "$1" @@ -774,6 +779,9 @@ test_cmp() { # # except that the greeting and config --unset must both succeed for # the test to pass. +# +# Note that under --immediate mode, no clean-up is done to help diagnose +# what went wrong. test_when_finished () { test_cleanup="{ $* |