Skip to content

Commit 07431fc

Browse files
jrngitster
authored andcommitted
tests: simplify "missing PREREQ" message
When a test has no prerequisites satisfied (the usual case), instead of "missing THING of THING", just say "missing THING". This does not affect the output when a test is skipped due to a missing prerequisites if another prerequisite is satisfied. For example: instead of ok 8 # skip notes work (missing EXPENSIVE of EXPENSIVE) ok 9 # skip notes timing with /usr/bin/time (missing EXPENSIVE of USR_BIN_TIME,EXPENSIVE) write ok 8 # skip notes work (missing EXPENSIVE) ok 9 # skip notes timing with /usr/bin/time (missing EXPENSIVE of USR_BIN_TIME,EXPENSIVE) Cc: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7b90511 commit 07431fc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

t/test-lib.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,14 @@ test_skip () {
417417
fi
418418
case "$to_skip" in
419419
t)
420+
of_prereq=
421+
if test "$missing_prereq" != "$prereq"
422+
then
423+
of_prereq=" of $prereq"
424+
fi
425+
420426
say_color skip >&3 "skipping test: $@"
421-
say_color skip "ok $test_count # skip $1 (missing $missing_prereq of $prereq)"
427+
say_color skip "ok $test_count # skip $1 (missing $missing_prereq${of_prereq})"
422428
: true
423429
;;
424430
*)

0 commit comments

Comments
 (0)