Skip to content

Commit 092c433

Browse files
avargitster
authored andcommitted
test-lib: Ignore --quiet under a TAP harness
Running the tests with --quiet under a TAP harness will always fail, since a TAP harness always needs actual test output to go along with the plan that's being emitted. Change the test-lib.sh to ignore the --quiet option under HARNESS_ACTIVE to work around this. Then users that have --quiet in their GIT_TEST_OPTS can run tests under prove(1) without everything breaking. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent c966745 commit 092c433

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/test-lib.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ do
127127
-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
128128
verbose=t; shift ;;
129129
-q|--q|--qu|--qui|--quie|--quiet)
130-
quiet=t; shift ;;
130+
# Ignore --quiet under a TAP::Harness. Saying how many tests
131+
# passed without the ok/not ok details is always an error.
132+
test -z "$HARNESS_ACTIVE" && quiet=t; shift ;;
131133
--with-dashes)
132134
with_dashes=t; shift ;;
133135
--no-color)

0 commit comments

Comments
 (0)