From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH] t/t0000-basic.sh: Don't run a passing TODO unless TEST_PASSING_TODO=1
Date: Tue, 17 Aug 2010 09:43:54 +0000 [thread overview]
Message-ID: <1282038234-1880-1-git-send-email-avarab@gmail.com> (raw)
Change the sanity tests in t/t0000-basic.sh to not to run a passing
TODO test unless the TEST_PASSING_TODO environment variable is set.
The motivation is to have nothing out of the ordinary on a normal test
run for test smoking purposes.
If every normal test run has a passing TODO you're more likely to turn
a blind eye to it and not to investigate cases where things really are
passing unexpectedly.
It also makes the prove(1) output less noisy. Before:
All tests successful.
Test Summary Report
-------------------
./t0000-basic.sh (Wstat: 0 Tests: 46 Failed: 0)
TODO passed: 5
Files=484, Tests=6229, 143 wallclock secs ( 4.00 usr 4.15 sys + 104.77 cusr 351.57 csys = 464.49 CPU)
Result: PASS
And after:
All tests successful.
Files=484, Tests=6228, 139 wallclock secs ( 4.07 usr 4.25 sys + 104.54 cusr 350.85 csys = 463.71 CPU)
Result: PASS
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
t/t0000-basic.sh | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index f2c7336..2f6a17b 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -54,9 +54,14 @@ test_expect_success 'success is reported like this' '
test_expect_failure 'pretend we have a known breakage' '
false
'
-test_expect_failure 'pretend we have fixed a known breakage' '
- :
-'
+if test -z "$TEST_PASSING_TODO"
+then
+ say "Not testing a known breakage, set TEST_PASSING_TODO=1 to enable"
+else
+ test_expect_failure 'pretend we have fixed a known breakage' '
+ :
+ '
+fi
test_set_prereq HAVEIT
haveit=no
test_expect_success HAVEIT 'test runs if prerequisite is satisfied' '
--
1.7.2.1.389.gc3d0b
next reply other threads:[~2010-08-17 9:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 9:43 Ævar Arnfjörð Bjarmason [this message]
2010-08-17 17:57 ` [PATCH] t/t0000-basic.sh: Don't run a passing TODO unless TEST_PASSING_TODO=1 Sverre Rabbelier
2010-08-17 19:12 ` Junio C Hamano
2010-08-18 13:34 ` [PATCH v2 0/4] Support for running tests outside t/ + don't run a TODO test Ævar Arnfjörð Bjarmason
2010-08-19 16:05 ` Ævar Arnfjörð Bjarmason
2010-08-19 16:05 ` [PATCH v2 1/4] test-lib: Use $TEST_DIRECTORY or $GIT_BUILD_DIR instead of $(pwd) and ../ Ævar Arnfjörð Bjarmason
2010-08-19 16:05 ` [PATCH v2 2/4] test-lib: Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY"/../ Ævar Arnfjörð Bjarmason
2010-08-19 16:06 ` [PATCH v2 3/4] test-lib: Allow overriding of TEST_DIRECTORY Ævar Arnfjörð Bjarmason
2010-08-19 16:06 ` [PATCH v2 4/4] t/t0000-basic.sh: Run the passing TODO test inside its own test-lib Ævar Arnfjörð Bjarmason
2010-08-19 16:08 ` [PATCH v3 0/4] Support for running tests outside t/ + don't run a TODO test Ævar Arnfjörð Bjarmason
2010-08-19 16:18 ` Jeff King
2010-08-19 16:08 ` [PATCH v3 1/4] test-lib: Use $TEST_DIRECTORY or $GIT_BUILD_DIR instead of $(pwd) and ../ Ævar Arnfjörð Bjarmason
2010-08-19 16:08 ` [PATCH v3 2/4] test-lib: Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY"/../ Ævar Arnfjörð Bjarmason
2010-08-19 16:08 ` [PATCH v3 3/4] test-lib: Allow overriding of TEST_DIRECTORY Ævar Arnfjörð Bjarmason
2010-08-19 16:08 ` [PATCH v3 4/4] t/t0000-basic.sh: Run the passing TODO test inside its own test-lib Ævar Arnfjörð Bjarmason
2010-08-18 13:34 ` [PATCH v2 1/4] test-lib: Use $TEST_DIRECTORY or $GIT_BUILD_DIR instead of $(pwd) and ../ Ævar Arnfjörð Bjarmason
2010-08-18 13:34 ` [PATCH v2 2/4] test-lib: Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY"/../ Ævar Arnfjörð Bjarmason
2010-08-18 13:34 ` [PATCH v2 3/4] test-lib: Allow overriding of TEST_DIRECTORY Ævar Arnfjörð Bjarmason
2010-08-18 13:34 ` [PATCH v2 4/4] t/t0000-basic.sh: Run the passing TODO test inside its own test-lib Ævar Arnfjörð Bjarmason
2010-08-19 17:39 ` Sverre Rabbelier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1282038234-1880-1-git-send-email-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).