git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Jeff King <peff@peff.net>, Git Mailing List <git@vger.kernel.org>,
	Pete Wyckoff <pw@padd.com>
Subject: Re: [PATCH] test-lib: add the test_pause convenience function
Date: Tue, 17 Jan 2012 11:15:34 -0800	[thread overview]
Message-ID: <7vboq2rvhl.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4F152F7C.9020902@web.de> (Jens Lehmann's message of "Tue, 17 Jan 2012 09:21:16 +0100")

Jens Lehmann <Jens.Lehmann@web.de> writes:

> I really don't care deeply about the name, so test_pause is absolutely
> ok for me. I added some documentation in t/README too and made it an
> error when --verbose is not used.

I don't care about the name at all, either.

What I cared was more about the hardcoded "bash". Believe it or not, there
are boxes that lack it, and there are people who prefer other shells for
their interactive work. At the very least, invoke "$SHELL_PATH" instead of
bash there, perhaps?

If we wanted to allow an ad-hoc debugging of test scripts to sprinkle
"test_pause $cmd", we might need to do something like:

> +test_pause () {
> +	if test "$verbose" = t; then
> +		bash <&6 >&3 2>&4
		${1-"$SHELL_PATH"} <&6 >&3 2>&4
> +	else
> +		error >&5 "test_pause requires --verbose"
> +	fi
> +}

but I do not think that is worth it. The debugging developer should easily
be able to run gdb or whatever from the interactive shell you are giving
here.

  reply	other threads:[~2012-01-17 19:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-15 20:00 [PATCH] test-lib: add the test_bash convenience function Jens Lehmann
2012-01-15 23:24 ` Jeff King
2012-01-16 15:49   ` [PATCH] test_interactive: interactive debugging in test scripts Pete Wyckoff
2012-01-16 20:01     ` Jens Lehmann
2012-01-16 20:11       ` Jeff King
2012-01-16 20:48         ` Jens Lehmann
2012-01-16 22:07           ` Pete Wyckoff
2012-01-16 20:19     ` Jeff King
2012-01-16 22:51   ` [PATCH] test-lib: add the test_bash convenience function Junio C Hamano
2012-01-17  8:21     ` [PATCH] test-lib: add the test_pause " Jens Lehmann
2012-01-17 19:15       ` Junio C Hamano [this message]
2012-01-17 21:04         ` [PATCH v2] " Jens Lehmann

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=7vboq2rvhl.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=pw@padd.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).