Re: [HACK] t/test-lib.sh HACK: Add -s/--show-hack to test suite.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>, PGP 0x6EDDD207FCC5040F
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux