automake-patches
[Top][All Lists]
Advanced

[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: Stefano Lattarini
Subject: Re: [BIKESHEDDING PATCH] Generated tests are now just a thin layer around other tests.
Date: Sun, 23 May 2010 15:01:20 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

At Sunday 23 May 2010, Ralf Wildenhues <address@hidden> 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'; \
>       } > address@hidden
>       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
> 

WDYT?

Regards,
    Stefano



reply via email to

[Prev in Thread] Current Thread [Next in Thread]