[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BIKESHEDDING PATCH] Generated tests are now just a thin layer aroun
From: |
Ralf Wildenhues |
Subject: |
Re: [BIKESHEDDING PATCH] Generated tests are now just a thin layer around other tests. |
Date: |
Sun, 23 May 2010 17:14:56 +0200 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
* Stefano Lattarini wrote on Sun, May 23, 2010 at 03:01:20PM CEST:
> At Sunday 23 May 2010, Ralf Wildenhues wrote:
> > Got lucky and intuition saved me from regressing branch-1.11 with
> > this one. I'm applying the fix below on top of this patch and
> > merging to master. The nontrivial point to note is that in the
> > wrapper script, srcdir needs to be expanded at testsuite run time
> > only, because it may differ from the srcdir value in the Automake
> > developer tree.
> Good catch. Note that my patch on the sepration of instspc.test has
> this same problem too.
OK, good to know. I haven't looked at the instspc patches yet.
> However, I think that a better way to resolve this problem would be to
> make @abs_srcdir@ substituted in defs.in (dropping the computation of
> $srcdir), and make defs.in robust w.r.t. multiple inclusion; then the
> generated test files could do simply:
>
> #!/bin/sh
> parallel_tests=yes
> . ./defs.in
> . $testsrcdir/INPUT.test
Hmm, yes, maybe. This needs quoting for spaces in abs_srcdir.
Also, doesn't it remove the automatic 'set -x' when we detect
scripts run manually?
> > diff --git a/tests/Makefile.am b/tests/Makefile.am
> > index cff34c5..bbeb2cb 100644
> > --- a/tests/Makefile.am
> > +++ b/tests/Makefile.am
> > @@ -34,7 +34,11 @@ $(parallel_tests): Makefile.am
> > { echo '#!/bin/sh'; \
> > echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
> > echo 'parallel_tests=yes'; \
> > - echo ". '$(srcdir)/$$input'"; \
> > + echo "if test -f ./$$input; then"; \
> > + echo " . ./$$input"; \
> > + echo 'else'; \
> > + echo " . \$$srcdir/$$input"; \
> ... this prevent the test script from working when run from the
> command line in a VPATH build -- with an error like:
> ./check-p.test: line 7: /check.test: No such file or directory
Yeah, that's bad. One alternative would be to generate *-p.test in the
source tree right away; after all, 'make dist' will have them end up
there in an extracted tarball anyway.
Cheers,
Ralf