From 07431fc8dc136573f31cb9db6605f49f792c8b10 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 24 Aug 2010 02:34:10 -0500 Subject: [PATCH] tests: simplify "missing PREREQ" message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- t/test-lib.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 4167138250..198dd860a2 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -417,8 +417,14 @@ test_skip () { fi case "$to_skip" in t) + of_prereq= + if test "$missing_prereq" != "$prereq" + then + of_prereq=" of $prereq" + fi + say_color skip >&3 "skipping test: $@" - say_color skip "ok $test_count # skip $1 (missing $missing_prereq of $prereq)" + say_color skip "ok $test_count # skip $1 (missing $missing_prereq${of_prereq})" : true ;; *) -- GitLab