git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 9, 2013, 19:16 UTC
Message-ID
<7vli8rqztj.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130409131802.GA25673@ruderich.org>
Simon Ruderich <simon@ruderich.org> writes:
Show 22 quoted lines
> On Sun, Apr 07, 2013 at 03:32:00PM -0700, Jonathan Nieder wrote:
>>> 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?
Show 14 quoted lines
>  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?

Show 10 quoted lines
>  
>  --long-tests::
>  	This causes additional long-running tests to be run (where
> -- 
> 1.8.2.481.g0d034d4
>
> -- 8< --
>
> Regards
> Simon
Previous: Simon RuderichNext: Simon Ruderich
Message 11 of 13 in “send-email: configuration improvements”
  1. 0/6 send-email: configuration improvementsFelipe Contreras, Apr 7, 2013
  2. 1/6 send-email: make annotate configurableFelipe Contreras, Apr 7, 2013
  3. Jakub NarębskiApr 9, 2013
  4. 2/6 format-patch: improve head calculation for cover-letterFelipe Contreras, Apr 7, 2013
  5. 3/6 format-patch: refactor branch name calculationFelipe Contreras, Apr 7, 2013
  6. 4/6 log: update to OPT_BOOLFelipe Contreras, Apr 7, 2013
  7. 5/6 format-patch: add format.cover-letter configurationFelipe Contreras, Apr 7, 2013
  8. Simon RuderichApr 7, 2013
  9. Jonathan NiederApr 7, 2013
  10. t/README: --immediate skips cleanup commands for failed testsSimon Ruderich, Apr 9, 2013
  11. Junio C HamanoApr 9, 2013
  12. t/README: --immediate skips cleanup commands for failed testsSimon Ruderich, Apr 9, 2013
  13. 6/6 format-patch: trivial cleanupsFelipe Contreras, Apr 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.