Skip to content

Commit

Permalink
test-lib: Print missing prerequisites in test output
Browse files Browse the repository at this point in the history
Change the test output to print needed prerequisites as part of the
TAP. This makes it easy to see at a glance why a test was
skipped. Before:

    ok 7 # skip <message>
    ok 9 # skip <message>

After:

    ok 7 # skip <message> (prereqs: DONTHAVEIT)
    ok 9 # skip <message> (prereqs: HAVEIT,DONTHAVEIT)

This'll also be useful for smoke testing output, where the developer
reading the output may not be familiar with the system where tests are
being skipped.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Aug 18, 2010
1 parent 93a5724 commit 71ce42c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ test_skip () {
case "$to_skip" in
t)
say_color skip >&3 "skipping test: $@"
say_color skip "ok $test_count # skip $1"
say_color skip "ok $test_count # skip $1 (prereqs: $prereq)"
: true
;;
*)
Expand Down

0 comments on commit 71ce42c

Please sign in to comment.