git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] WIP: Report intra-test progress with TAP subtests
Date: Tue, 10 Aug 2010 20:04:12 -0500	[thread overview]
Message-ID: <20100811010412.GA2994@burratino> (raw)
In-Reply-To: <AANLkTi=ygXFpRLR_Z7iEXX3THh+GT7P7X9o+NnaLajqs@mail.gmail.com>

Ævar Arnfjörð Bjarmason wrote:
> On Wed, Aug 11, 2010 at 00:44, Jonathan Nieder <jrnieder@gmail.com> wrote:

>> Maybe the test harness could automate that a little, by using
>> set -x at the beginning and set +x at the end of each test.
>
> The main use case for this for me is the smoke tester output, where
> you won't get access to the original machine (without asking). Having
> a few intra-test checkpoints helps you to see where things might have
> gone wrong.

I meant something like this:
-- 8< --
diff --git a/t/test-lib.sh b/t/test-lib.sh
index e5523dd..a4bc358 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -368,9 +368,11 @@ test_debug () {
 
 test_run_ () {
 	test_cleanup=:
+	set -x
 	eval >&3 2>&4 "$1"
 	eval_ret=$?
 	eval >&3 2>&4 "$test_cleanup"
+	set +x
 	if test "$verbose" = "t" && test -n "$HARNESS_ACTIVE"; then
 		echo ""
 	fi
-- >8 --

but made optional and with output munged into parsable format by
changing PS4 (or "set -T" with a DEBUG trap, if that’s portable
enough).

  reply	other threads:[~2010-08-11  1:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-10 20:57 [RFC/PATCH] WIP: Report intra-test progress with TAP subtests Ævar Arnfjörð Bjarmason
2010-08-11  0:44 ` Jonathan Nieder
2010-08-11  0:55   ` Ævar Arnfjörð Bjarmason
2010-08-11  1:04     ` Jonathan Nieder [this message]
2010-08-11  6:44       ` Johannes Sixt
2010-08-11  5:28 ` Jonathan Nieder
2010-08-11 16:41   ` Ævar Arnfjörð Bjarmason

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=20100811010412.GA2994@burratino \
    --to=jrnieder@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /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).