{"thread":{"id":"24592","subject":"[PATCH] test-lib: Ignore --quiet under a TAP harness","startedAt":"2010-07-31T16:40:05Z","lastAt":"2010-07-31T16:40:05Z","messageCount":1,"participants":["Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"146867","messageId":"1280594405-31572-1-git-send-email-avarab@gmail.com","threadId":"24592","inReplyTo":null,"subject":"[PATCH] test-lib: Ignore --quiet under a TAP harness","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-07-31T16:40:05Z","receivedAt":"2010-07-31T16:40:05Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Running the tests with --quiet under a TAP harness will always fail,\nsince a TAP harness always needs actual test output to go along with\nthe plan that's being emitted.\n\nChange the test-lib.sh to ignore the --quiet option under\nHARNESS_ACTIVE to work around this. Then users that have --quiet in\ntheir GIT_TEST_OPTS can run tests under prove(1) without everything\nbreaking.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/test-lib.sh |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex e5523dd..4b95138 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -127,7 +127,9 @@ do\n \t-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)\n \t\tverbose=t; shift ;;\n \t-q|--q|--qu|--qui|--quie|--quiet)\n-\t\tquiet=t; shift ;;\n+\t\t# Ignore --quiet under a TAP::Harness. Saying how many tests\n+\t\t# passed without the ok/not ok details is always an error.\n+\t\ttest -z \"$HARNESS_ACTIVE\" && quiet=t; shift ;;\n \t--with-dashes)\n \t\twith_dashes=t; shift ;;\n \t--no-color)\n-- \n1.7.1\n"}]}