Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] t/README: --immediate skips cleanup commands for failed tests

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:45

Possibly related (same subject, not in this thread)

Simon Ruderich [off-list ref] writes:
On Sun, Apr 07, 2013 at 03:32:00PM -0700, Jonathan Nieder wrote:
quoted
quoted
I'm not sure if it's better to use test_when_finished with rm or
just && rm -rf tmp at the end of the test in case someone wants
to look at the output.
test_when_finished is better here, since it means later tests can
run and provide useful information about how bad a regression is.
Cleanup commands requested using test_when_finished are not run when a
test being run with --immediate fails, so you can still inspect output
after a failed test.
Hello Jonathan,

Thanks for the explanation.

I couldn't find this documented in t/README, the following patch
adds it.

-- 8< --
Subject: [PATCH] t/README: --immediate skips cleanup commands for failed tests

---
Sign-off?
quoted hunk
 t/README | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/README b/t/README
index 9b41fe7..e5e7d37 100644
--- a/t/README
+++ b/t/README
@@ -86,7 +86,8 @@ appropriately before running "make".
 
 --immediate::
 	This causes the test to immediately exit upon the first
-	failed test.
+	failed test. Cleanup commands requested with
+	test_when_finished are not executed if the test failed.
Perhaps adding "... to keep the state for inspection by the tester
to diagnose the bug" or something is in order?
 
 --long-tests::
 	This causes additional long-running tests to be run (where
-- 
1.8.2.481.g0d034d4

-- 8< --

Regards
Simon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help