automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Improve declaration of dependencies in the testsuite.


From: Ralf Wildenhues
Subject: Re: [PATCH] Improve declaration of dependencies in the testsuite.
Date: Mon, 7 Jun 2010 23:23:28 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

Hi Stefano,

* Stefano Lattarini wrote on Sat, May 08, 2010 at 03:07:34AM CEST:
> * tests/Makefile.am: Declare all the testsuite logs as dependent
> from `defs', since all test scripts include ./defs.
> * test/gen-parallel-tests:  Generate declaration of dependecy for
> each `foo-p.log' from the corresponding `foo.test', since each
> `foo-t.test' script sources the corresponding `foo.test'.

Ah, good observation.  Yes, I think we want something like this for a
better `make check RECHECK_LOGS=' experience.

However, for completeness we should depend on all check_SCRIPTS in this
directory.  (To be very pedantic, test results depend on many more files
in the Automake tree, but I don't want to sort these things out, and
these dependencies would not allow for more laziness in execution.)
This allows to remove check_SCRIPTS, which saves one more sub-make.  :-)

I've gone a bit over your patch and am committing the following variant
(to master only).

Thanks,
Ralf

2010-06-07  Stefano Lattarini  <address@hidden>
            Ralf Wildenhues  <address@hidden>

        Improve declaration of dependencies in the testsuite.
        * tests/Makefile.am (check_SCRIPTS): Remove.  Instead, let ...
        ($(TEST_LOGS)): ... all test logs depend on the scripts.
        * test/gen-parallel-tests: For each parallel test foo-p.test,
        let `foo-p.log' also depend on `foo.test', since it is sourced.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 361294b..2fe615c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -795,7 +795,7 @@ $(parallel_tests)
 EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
 
 # Each test case depends on defs, aclocal, and automake.
-check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
+$(TEST_LOGS): defs aclocal-$(APIVERSION) automake-$(APIVERSION)
 
 clean-local: clean-local-check
 .PHONY: clean-local-check
diff --git a/tests/gen-parallel-tests b/tests/gen-parallel-tests
index 39f5d1e..d2a5c13 100755
--- a/tests/gen-parallel-tests
+++ b/tests/gen-parallel-tests
@@ -35,8 +35,18 @@ while read tst; do
      || grep "parallel_tests=['\"]yes" $tst >/dev/null
   then :; else echo $tst; fi;
 done |
+sed -e 's/\.test$//' |
 {
   echo "## Generated by gen-parallel-tests.  Edit Makefile.am instead of this."
-  echo "parallel_tests = \\"
-  sed 's,\.test$,-p.test,; $!s,$, \\,'
+  echo "parallel_tests ="
+  # Since `foo-p.test' sources `foo.test', `foo-p.log' also depends on
+  # `foo.test'.
+  sed -e '
+    h
+    s/^/parallel_tests += /
+    s/$/-p.test/
+    p
+    x
+    s/.*/&-p.log: &.test/
+  '
 }



reply via email to

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