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: Ralf Wildenhues
Subject: Re: [BIKESHEDDING PATCH] Generated tests are now just a thin layer around other tests.
Date: Sun, 23 May 2010 14:42:33 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

* Stefano Lattarini wrote on Sun, Mar 07, 2010 at 05:15:24PM CET:
> Generated tests are now just a thin layer around other tests.
> 
> * tests/Makefile.am: Rewrite the rule to generate the `*-p.test'
> test scripts so that any of them simply includes the corresponding
> `*.test' script (after setting `$parallel_tests' to `yes').
> * tests/.gitignore: Add wildcard for temporary files used in the
> generation of `*-p.test' tests.

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.

Cheers,
Ralf

    Fix distcheck failure with distributed generated parallel tests.
    
    * tests/Makefile.am ($(parallel_tests)): Cope with $(srcdir)
    being different from the value at developer 'make dist' time.
    While at it, also tolerate dependent tests in the build tree.

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



reply via email to

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