At Sunday 23 May 2010, Ralf Wildenhues <[email protected]> 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.

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

Also...

> 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
> +       echo 'fi'; \
>       } > $...@-t
>       $(AM_V_at)chmod a+rx $...@-t && mv -f $...@-t $@
> 

WDYT?

Regards,
    Stefano

Reply via email to