t: stop announcing prereqs
We have a couple of cases where our tests end up announcing that a certain prerequisite is or isn't fulfilled. While this is supposed to help the developer it has the downside that it breaks the TAP format. We could convert these cases to just have a "#" prefix, but it feels rather unlikely that these are generally useful in the first place. We already do announce why a specific test is being skipped, so we should try to use this mechanism to the best extent possible. Stop announcing these prereqs to fix the TAP format. Where possible, convert the tests to rely on the prerequisites themselves to announce why a test ran or didn't ran. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
8613c2bb6c
commit
faac9d46e0
@@ -700,19 +700,17 @@ test_expect_success \
|
||||
# ----------------------------------------------------------------------
|
||||
# syntax highlighting
|
||||
|
||||
test_lazy_prereq HIGHLIGHT '
|
||||
highlight_version=$(highlight --version </dev/null 2>/dev/null) &&
|
||||
test -n "$highlight_version"
|
||||
'
|
||||
|
||||
highlight_version=$(highlight --version </dev/null 2>/dev/null)
|
||||
if [ $? -eq 127 ]; then
|
||||
say "Skipping syntax highlighting tests: 'highlight' not found"
|
||||
elif test -z "$highlight_version"; then
|
||||
say "Skipping syntax highlighting tests: incorrect 'highlight' found"
|
||||
else
|
||||
test_set_prereq HIGHLIGHT
|
||||
test_expect_success HIGHLIGHT '
|
||||
cat >>gitweb_config.perl <<-\EOF
|
||||
our $highlight_bin = "highlight";
|
||||
$feature{'highlight'}{'override'} = 1;
|
||||
$feature{"highlight"}{"override"} = 1;
|
||||
EOF
|
||||
fi
|
||||
'
|
||||
|
||||
test_expect_success HIGHLIGHT \
|
||||
'syntax highlighting (no highlight, unknown syntax)' \
|
||||
|
||||
Reference in New Issue
Block a user