git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [HACK] t/test-lib.sh HACK: Add -s/--show-hack to test suite.
Date: Sun, 13 Jul 2008 00:22:12 +0200	[thread overview]
Message-ID: <20080712222212.GC22323@leksak.fem-net> (raw)
In-Reply-To: <alpine.DEB.1.00.0807071540310.18205@racer>

Hi,

I'm just cleaning up my inbox and I've seen I've not yet replied to your
mail.

Johannes Schindelin wrote:
> Hi,
> 
> On Mon, 7 Jul 2008, Stephan Beyer wrote:
> 
> > > > This option realizes a stupid hack that tries to run the test cases 
> > > > line by line (separated by &&).
> > > 
> > > In what way is that better than "sh -x t????-*.sh"?
> > 
> > Your suggestion is more like "./t????-*.sh -v" instead of -s, at least
> > on bash and dash here.
> 
> No, I meant without "-v".

Me, too.

I've written something different:
"sh -x" is a great thing and does exactly what it should on simple scripts
containing:

	foo &&
	bar &&
	baz

But for a test case in the git test suite it does not work, unfortunately.
(Tested on bash, dash and zsh.)

The information I get from
	sh -x ./t????-*.sh
is like the information I get from invoking
	./t????-*.sh -v
but less eye-pleasing.
And ./t????-*.sh -s (using this patch) shows me something like:

	Testing:
		foo

	Testing:
		bar

	* FAIL: blabla

So that I what *command* of the test case fails.

But perhaps I am just doing something wrong.

> > But I didn't know the -x flag and it seems that this could be used in 
> > test-lib.sh to make the hack faster, more robust and less hacky ;-)
> 
> It would obsolete your hack, I suggest.  Obviously, you haven't tried it 
> yet.

The obvious is wrong.

I would be very happy to obsolete my slow and error-prone hack, but
currently I have not seen a good alternative.

Regards,
  Stephan

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F

  reply	other threads:[~2008-07-12 22:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-06 20:22 [HACK] t/test-lib.sh HACK: Add -s/--show-hack to test suite Stephan Beyer
2008-07-06 20:41 ` Johannes Schindelin
2008-07-07 14:08   ` Stephan Beyer
2008-07-07 14:41     ` Johannes Schindelin
2008-07-12 22:22       ` Stephan Beyer [this message]
2008-07-13  0:25         ` Johannes Schindelin
2008-07-13 11:09           ` Stephan Beyer
2008-07-13 13:21             ` Johannes Schindelin
2008-07-21  1:24               ` Stephan Beyer

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080712222212.GC22323@leksak.fem-net \
    --to=s-beyer@gmx.net \
    --cc=Johannes.Schindelin@gmx.de \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).