From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] test: skip clean-up when running under --immediate mode
Date: Tue, 28 Jun 2011 18:51:47 -0400 [thread overview]
Message-ID: <20110628225147.GD4192@sigill.intra.peff.net> (raw)
In-Reply-To: <7vmxh3xidt.fsf@alter.siamese.dyndns.org>
On Mon, Jun 27, 2011 at 11:02:22AM -0700, Junio C Hamano wrote:
> Some tests try to be too careful about cleaning themselves up and
> do
>
> test_expect_success description '
> set-up some test refs and/or configuration &&
> test_when_finished "revert the above changes" &&
> the real test
> '
>
> Which is nice to make sure that a potential failure would not have
> unexpected interaction with the next test. This however interferes when
> "the real test" fails and we want to see what is going on, by running the
> test with --immediate mode and descending into its trash directory after
> the test stops. The precondition to run the real test and cause it to fail
> is all gone after the clean-up procedure defined by test_when_finished is
> done.
>
> Update test_run_ which is the workhorse of running a test script
> called from test_expect_success and test_expect_failure, so that we do not
> run clean-up script defined with test_when_finished when a test that is
> expected to succeed fails under the --immediate mode.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>
> * Likes, dislikes?
This sounds to me like the right thing to do. The current behavior has
never been a problem for me, but that is probably because
test_when_finished is relatively new. If I were to run into this
situation, your patch does exactly what I would expect.
-Peff
next prev parent reply other threads:[~2011-06-28 22:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-27 18:02 [RFC/PATCH] test: skip clean-up when running under --immediate mode Junio C Hamano
2011-06-28 22:51 ` Jeff King [this message]
2011-06-30 6:45 ` Michael J Gruber
2011-07-01 10:49 ` 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=20110628225147.GD4192@sigill.intra.peff.net \
--to=peff@peff.net \
--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).