summaryrefslogtreecommitdiff
path: root/Documentation/howto
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-10-22 04:45:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-10-24 16:26:00 (GMT)
commit614fe015212d057c0571885c42a29a995973107d (patch)
tree5a6c27b827b02327eb9e396ccdae678b9752135b /Documentation/howto
parent041c72de109075d630f77bc2ad225f6339f33c9a (diff)
downloadgit-614fe015212d057c0571885c42a29a995973107d.zip
git-614fe015212d057c0571885c42a29a995973107d.tar.gz
git-614fe015212d057c0571885c42a29a995973107d.tar.bz2
test-lib: bail out when "-v" used under "prove"
When there is a TAP harness consuming the output of our test scripts, the "--verbose" breaks the output by mingling test command output with TAP. Because the TAP::Harness module used by "prove" is fairly lenient, this _usually_ works, but it violates the spec, and things get very confusing if the commands happen to output a line that looks like TAP (e.g., the word "ok" on its own line). Let's detect this situation and complain. Just calling error() isn't great, though; prove will tell us that the script failed, but the message doesn't make it through to the user. Instead, we can use the special TAP signal "Bail out!". This not only shows the message to the user, but instructs the harness to stop running the tests entirely. This is exactly what we want here, as the problem is in the command-line options, and every test script would produce the same error. The result looks like this (the first "Bailout called" line is in red if prove uses color on your terminal): $ make GIT_TEST_OPTS='--verbose --tee' rm -f -r 'test-results' *** prove *** Bailout called. Further testing stopped: verbose mode forbidden under TAP harness; try --verbose-log FAILED--Further testing stopped: verbose mode forbidden under TAP harness; try --verbose-log Makefile:39: recipe for target 'prove' failed make: *** [prove] Error 255 Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/howto')
0 files changed, 0 insertions, 0 deletions