From: Ramsay Jones Date: Sat, 1 Sep 2012 18:13:19 +0000 (+0100) Subject: test-lib.sh: Add check for invalid use of 'skip_all' facility X-Git-Tag: v1.8.0-rc0~62^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bf4b7219322d007f3ebd2a002114956d025e4703;p=git.git test-lib.sh: Add check for invalid use of 'skip_all' facility The 'skip_all' facility cannot be used after one or more tests have been executed using (for example) 'test_expect_success'. To do so results in invalid TAP output, which leads to 'prove' complaining of "Parse errors: No plan found in TAP output". Add a check for such invalid usage and abort the test with an error message to alert the test author. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- diff --git a/t/test-lib.sh b/t/test-lib.sh index 007d7b20d..7f4cb67c0 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -383,6 +383,10 @@ test_done () { case "$test_failure" in 0) # Maybe print SKIP message + if test -n "$skip_all" && test $test_count -gt 0 + then + error "Can't use skip_all after running some tests" + fi [ -z "$skip_all" ] || skip_all=" # SKIP $skip_all" if test $test_external_has_tap -eq 0