automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11b-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11b-140-g4b0e56f
Date: Thu, 26 Apr 2012 13:12:39 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=4b0e56f48db441424a76730ac735163e59029d73

The branch, ng/master has been updated
       via  4b0e56f48db441424a76730ac735163e59029d73 (commit)
       via  b5d6d18a1f2749612b3d0b439a43d89fabf1a719 (commit)
       via  66d406afde0e6639e389e9fdef060dc096613537 (commit)
       via  82ffca3d9a7946f78f4602f6b9a5a5b87aa42b90 (commit)
       via  7dbe3efd9f3a5937b92644303ab8d87761c687ca (commit)
       via  1690aca2063d8ba754e619681242324f09fa6635 (commit)
       via  1588135a1fa4096fdcb733eef899cfa50d24e9f2 (commit)
       via  a9f1c30d11a84393953264c4444125916f24769b (commit)
       via  53b45c7187a1031f9c07cbd93e6e0a8c90e579bd (commit)
       via  e4412726eb36809bd21b3bb308b2f791e4154e43 (commit)
       via  8117459644f4ffbea15428c8a1f69262ad911641 (commit)
      from  3eec8e2434a34d673e66eae1817f8a88960656db (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4b0e56f48db441424a76730ac735163e59029d73
Merge: 3eec8e2 b5d6d18
Author: Stefano Lattarini <address@hidden>
Date:   Thu Apr 26 14:49:28 2012 +0200

    Merge branch 'parallel-tests-work' into ng/master
    
    * parallel-tests-work:
      [ng] tests: fix a spurious failure on Solaris 10
      [ng] parallel-tests: fix confusing function names in Makefile recipes
      [ng] parallel-tests: remove obsolete comment
      [ng] tests: run long-running ones early (useful with parallel make)
      [ng] build: define $(TESTS) through a wildcard
      [ng] parallel-tests: support "TESTS = $(srcdir)/foo.test"
      [ng] coverage: parallel-tests and dynamic $(TESTS) content
      [ng] parallel-tests: simplify automake-time preprocessing
      [ng] cleanup: simplify %transforms for parallel-tests handling
      [ng] parallel-tests: simplify, using pattern rules with multiple targets
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit b5d6d18a1f2749612b3d0b439a43d89fabf1a719
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 23 11:16:09 2012 +0200

    [ng] tests: fix a spurious failure on Solaris 10
    
    * t/parallel-tests-unreadable.sh: On Solaris 10, on an error due to missing
    read permission, 'cat' reports simply "cat: cannot open FILENAME", rather
    than a proper "Permission denied" message; similarly fr grep.  Adjust the
    test (and comments) to cater for that.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 66d406afde0e6639e389e9fdef060dc096613537
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 23 10:57:29 2012 +0200

    [ng] parallel-tests: fix confusing function names in Makefile recipes
    
    * lib/am/check.am: Rename shell function 'result_count' to
    'display_result_count', to avoid confusion with the recently
    added 'count_result' function.  Throw in a couple of cosmetic
    improvements since we are at it.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 82ffca3d9a7946f78f4602f6b9a5a5b87aa42b90
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 23 11:31:57 2012 +0200

    [ng] parallel-tests: remove obsolete comment
    
    * lib/am/check.am ($(TEST_SUITE_LOGS)): Remove a comment referring to a
    FreeBSD make bug that is not present in GNU make.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 7dbe3efd9f3a5937b92644303ab8d87761c687ca
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 23 10:39:39 2012 +0200

    [ng] tests: run long-running ones early (useful with parallel make)
    
    For multicore machines, whenever running the testsuite in parallel, it
    makes sense to start the longer-running tests earlier, to make better
    use of the CPU parallelism (in particular, to minimize the possibility
    that the test harness will be left stuck to wait a single tests to
    finish, thus leaving all cores but one idle).
    
    In the previous commit 'v1.11b-129-g1690aca', we started defining the
    automake $(TESTS) through a call to the $(wildcard) function.  This has
    many positive effects, but also the drawback that the tests are now
    ordered randomly, so that there is an unpredictable possibility that
    some long-running will be executed late, which is bad in light of what
    explained above.
    
    But luckily, we can be still able to ensure longer tests are run early,
    by using a simple trick (which relies on those very GNU make features
    that the parallel testsuite harness has only recently learned to grasp).
    
    * Makefile.am (long_running_TESTS, all_TESTS): New variables.
    (TESTS): Redefine in function of them, in a way that ensures the tests
    in $(long_running_TESTS) are run first.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 1690aca2063d8ba754e619681242324f09fa6635
Author: Stefano Lattarini <address@hidden>
Date:   Sun Apr 22 21:06:13 2012 +0200

    [ng] build: define $(TESTS) through a wildcard
    
    We can finally do that thanks to our recent improvements to the parallel
    testsuite harness :-)
    
    * t/list-of-tests.mk: Delete.
    * t/CheckListOfTests.am: Likewise, the checks it implemented being now
    redundant.
    * syntax-checks.mk (maintainer-check): Don't depend on the obsolete and
    now removed 'maintainer-check-list-of-tests' check anymore.
    * Makefile.am: Don't include those deleted makefile fragments anymore.
    (TESTS): Define through a proper use of the $(wildcard) GNU make builtin.
    (perl_fake_XFAIL_TESTS, XFAIL_TESTS): Moved in from 't/list-of-tests.mk'.
    ($(srcdir)/t/testsuite-part.am): Don't generate nor include anymore, ...
    ($(srcdir)/autodeps.am): ... generate and include this instead.
    Remove explicit dependency of the generated tests and their list on the
    '$(srcdir)/gen-testsuite-part' file; while technically correct, that was
    overly picky and source of problems for casual testers/users.  And anyway,
    we don't have an explicit list of all the generated files anymore ...
    * bootstrap: Adjust, by generating 'testsuite-autodeps.am' rather than
    't/testsuite-part.am'.
    * .gitignore: Update.
    * t/self-check-dir.tap: Update to avoid a spurious failure due to the
    changes in Makefile.am.
    * gen-testsuite-part: Do not output the list of automatically generated
    tests.  Ensure the generated tests are always placed in the $(srcdir).
    Assume (here and in the generated scripts) that all the test scripts
    (whther autogenerated or not) are to be found in $(srcdir).  Adjust some
    comments.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 1588135a1fa4096fdcb733eef899cfa50d24e9f2
Author: Stefano Lattarini <address@hidden>
Date:   Sun Apr 22 16:37:11 2012 +0200

    [ng] parallel-tests: support "TESTS = $(srcdir)/foo.test"
    
    This change fixes a small but annoying limitation of the parallel
    testsuite harness.   Before this change, if $(TESTS) contained a test
    case with '$(srcdir)' in its name:
    
      TESTS = $(srcdir)/foo.test
    
    the parallel testsuite driver would have created the 'foo.log' and
    'foo.trs' files in the source directory rather than in the build
    directory.  This made it impossible to employ useful constructs of the
    following kind:
    
      TESTS = $(wildcard *.test)
    
    in a VPATH setup.  In fact, the idiom as written above would have missed
    any test in the source directory (i.e., any non-generated tests), while
    the "corrected" idiom:
    
      TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh t[0-9][0-9]*.sh)
    
    would have created the '.log' and '.trs' files for any distributed test
    in the source directory.
    
    After this change, the "corrected" idiom above is usable, and created
    '.log' and '.trs' files in the build directory.
    
    * doc/automake.texi: Don't warn about the old limitation anymore.
    * NG-NEWS: Document that that limitation has been lifted.
    * lib/am/check.am (am__cooked_tests): New variable, containing all the
    entries of $(TESTS) with $(srcdir) prefix (if present) removed.
    * am__cooked_tests: Likewise, but for the contents of $(XFAIL_TESTS).
    * automake.in (handle_tests): Adjust the definition of $(TEST_LOGS) to
    use '$(am__cooked_tests)' instead of raw '$(TESTS)'.
    * t/parallel-tests-srcdir-in-test-name.sh: Adjust to test the new
    semantics.
    * t/list-of-tests.mk (XFAIL_TESTS): Remove the above test, it now
    passes.
    * t/parallel-tests-dynamic.sh: Enhance a little.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit a9f1c30d11a84393953264c4444125916f24769b
Author: Stefano Lattarini <address@hidden>
Date:   Sun Apr 22 15:15:02 2012 +0200

    [ng] coverage: parallel-tests and dynamic $(TESTS) content
    
    The recent changes to the parallel-tests implementation should allow us
    to define or override TESTS with more dynamic contents; in particular,
    something like:
    
      TESTS = $(wildcard t[0-9][0-9]*.sh)
    
    should now work smoothly.  Let's cover this enhanced functionalities
    explicitly in our testsuite.
    
    * t/parallel-tests-dynamic.sh: New test.
    * t/list-of-tests.mk: Add it.
    * NG-NEWS: Document the new feature.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 53b45c7187a1031f9c07cbd93e6e0a8c90e579bd
Author: Stefano Lattarini <address@hidden>
Date:   Fri Apr 20 21:04:36 2012 +0200

    [ng] parallel-tests: simplify automake-time preprocessing
    
    Our new pattern rules, introduced in recent commit 'v1.11b-124-gaeaba3f',
    are smart enough to allow us to ditch most of our cumbersome automake-time
    analysis and rewriting of the $(TESTS) variable when the parallel-tests
    driver is used.  This also makes other related simplifications possible.
    
    This change causes a little regression in that we won't be able anymore to
    diagnose at automake time test cases that start with the '$(srcdir)' or
    '$(top_srcdir)' component, but that's acceptable, since a later commit will
    make the former case actually work, and the second case isn't important
    enough to worry to much about.
    
    This change also causes a small behavioural change in automake, in that it
    will also need the 'LOG_DRIVER' variable to be defined in each Makefile.am
    defining the 'TESTS' variable; and if it's not defined, automake will
    define it itself, and require the presence of the 'test-driver' auxiliary
    script in the process (or bing it in if the "--add-missing" option is in
    use).  See the changes to 'NG-NEWS' for more details, and for workarounds.
    
    * automake.in (handle_tests): Don't walk nor rewrite $(TESTS) when the
    'parallel-tests' option is active.  Other related minor simplifications.
    * t/exeext4.sh: Define '$am_parallel_tests' to "no", so that the test
    won't be run with the 'parallel-tests' option enabled (as the semantics
    in that case have been changed in a way that would make this test fail).
    * t/check7.sh: When '$am_parallel_tests' is "yes", skip checks that
    don't work anymore with the 'parallel-tests' option is enabled.
    * t/test-driver-custom-no-extra-driver.sh: Adjust to avoid spurious
    failures to to the "LOG_DRIVER must be defined somehow" semantic change.
    * t/tap-common-setup.sh: Likewise.
    * t/tap-recheck.sh: Likewise.
    * t/tap-basic.sh: Likewise.
    * t/tap-diagnostic-custom.sh: Likewise.
    * t/tap-more.sh: Likewise.
    * t/tap-recheck.sh: Likewise.
    * t/tap-signal.tap: Likewise.
    * t/test-driver-custom-multitest.sh: Likewise.
    * t/test-driver-custom-multitest-recheck.sh: Likewise.
    * t/test-driver-custom-multitest-recheck2.sh: Likewise.
    * t/test-driver-custom-xfail-tests.sh: Likewise.
    * t/test-driver-fail.sh: Likewise.
    * t/test-driver-strip-vpath.sh: Likewise.
    * t/test-metadata-global-log.sh: Likewise.
    * t/test-metadata-global-results.sh: Likewise, and enhanced a little since
    we are at it.
    * t/test-metadata-results.sh: Likewise.
    * t/tap-bad-prog.tap: Likewise.
    * t/parallel-tests8.sh: Move the now-failing checks verifying that automake
    diagnoses test cases that start with the '$(srcdir)' or '$(top_srcdir)'...
    * t/parallel-tests-srcdir-in-test-name.sh: ... this new xfailing test.
    * t/spy-pattern-rules.sh: New "spy" test, verify our new assumptions on the
    precedence of pattern rules truly hold.
    * t/parallel-tests-longest-stem.sh: New test.
    * t/list-of-tests.mk: Update.
    * doc/automake.texi: Document that $(TESTS) is rewritten for $(EXEEXT)
    appending only when the 'parallel-tests' option is *not* in use.
    Add a "FIXME" comment about the fact that automake does not diagnose test
    cases that start with the '$(srcdir)' or '$(top_srcdir)' anymore.
    * NG-NEWS: Update.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit e4412726eb36809bd21b3bb308b2f791e4154e43
Author: Stefano Lattarini <address@hidden>
Date:   Fri Apr 20 18:04:47 2012 +0200

    [ng] cleanup: simplify %transforms for parallel-tests handling
    
    * automake.in (handle_tests, handle_per_suffix_test): Drop some %transforms
    previously required when processing 'lib/am/check.am': '%SOURCE%', '%OBJ%',
    '%BASE%' and '?GENERIC?'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 8117459644f4ffbea15428c8a1f69262ad911641
Author: Stefano Lattarini <address@hidden>
Date:   Thu Apr 19 14:44:54 2012 +0200

    [ng] parallel-tests: simplify, using pattern rules with multiple targets
    
    In GNU make, a pattern with multiple targets, like:
    
        %.tab.c %.tab.h: %.y
                bison -d $<
    
    informs make that the associated recipe (in this example, "bison -d foo.y")
    will make create all the targets *at once* (in this example, both 'x.tab.c'
    and 'x.tab.h').
    
    Using this semantics we can simplify the parallel testsuite harness nicely,
    especially the recipe to build 'test-suite.log' in face of partially
    missing prerequisites (e.g., a missing '.trs' file while the corresponding
    '.log' file is present and up-to-date).
    
    In doing so, we unfortunately lose the ability to cope with very fringe-case
    situations and weird errors (e.g., a '.log' or '.trs' file somehow created
    unreadable), but that's a more than fair trade-off for the simplifications
    we obtain.
    
    * lib/am/check.am (am__set_TESTS_bases): Removed, superseded  by ...
    (am__TEST_BASES): ... this new variable.
    (check-TESTS, recheck): Adjust these recipes.
    (am__TEST_RESULTS): New variable.
    (am__check_pre): Adjust, to avoid an extra error (syntax error in the
    shell) when a circular dependency due to $(TEST_SUITE_LOG) being listed
    in $(TEST_LOGS) is detected.
    ($(TEST_SUITE_LOG)): Recipe heavily edited and simplified.  Also,
    depend on $(am__TEST_RESULTS) explicitly.
    (.log.trs): Remove this suffix rule, superseded by ...
    * lib/am/check2.am (%.log %.trs): ... this new pattern rule.
    Remove obsolete suffix rules.
    (am__runtest): Adjust.
    * automake.in (handle_tests): Adjust minimally.
    * lib/Automake/Rule.pm: Skip detection of duplicated rules for pattern
    rules; it would be tricky, prone to false positives, and not worth it.
    * t/parallel-tests-fork-bomb.sh: Minimal adjustments.
    * t/parallel-tests-unreadable.sh: Adjust functional tests.
    * t/serial-tests.sh: Adjust grepping checks.
    * t/serial-extensions.sh: Likewise.
    * t/parallel-tests-fd-redirect.sh: Relax grepping checks.
    * t/parallel-tests-fd-redirect-exeext.sh: Likewise.
    * t/test-trs-basic.sh: Adjust checks about some internal details that
    have been changed.
    * t/parallel-tests-no-repeat.sh: New test.
    * t/test-trs-recover-parallel.sh: Likewise.
    * t/test-driver-trs-suffix-registered.sh: Remove as obsolete.
    * t/test-missing2.sh: Remove (as "too picky").
    * t/test-trs-recover2.sh: Likewise.
    * t/list-of-tests.mk: Update.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                         |    2 +-
 Makefile.am                                        |   93 +-
 NG-NEWS                                            |   33 +
 automake.in                                        |  133 +--
 bootstrap                                          |    6 +-
 doc/automake.texi                                  |    9 +-
 gen-testsuite-part                                 |   78 +-
 lib/Automake/Rule.pm                               |   39 +-
 lib/am/check.am                                    |  181 ++--
 lib/am/check2.am                                   |   13 +-
 syntax-checks.mk                                   |    4 -
 t/CheckListOfTests.am                              |   68 --
 t/check7.sh                                        |    9 +-
 t/exeext4.sh                                       |    1 +
 t/list-of-tests.mk                                 | 1274 --------------------
 t/parallel-tests-dynamic.sh                        |  145 +++
 t/parallel-tests-exeext.sh                         |    3 -
 t/parallel-tests-fd-redirect-exeext.sh             |    7 -
 t/parallel-tests-fd-redirect.sh                    |    6 -
 t/parallel-tests-fork-bomb.sh                      |    3 +-
 t/parallel-tests-longest-stem.sh                   |   66 +
 ...l-tests-once.sh => parallel-tests-no-repeat.sh} |   26 +-
 ...s8.sh => parallel-tests-srcdir-in-test-name.sh} |   67 +-
 t/parallel-tests-unreadable.sh                     |   65 +-
 t/parallel-tests8.sh                               |   18 +-
 t/self-check-dir.tap                               |    2 +-
 t/serial-tests.sh                                  |    4 +-
 t/{spy-phony.sh => spy-pattern-rules.sh}           |   61 +-
 t/tap-bad-prog.tap                                 |   13 +-
 t/tap-basic.sh                                     |    2 +
 t/tap-common-setup.sh                              |    8 +-
 t/tap-diagnostic-custom.sh                         |    1 +
 t/tap-more.sh                                      |    3 +-
 t/tap-recheck.sh                                   |    3 +-
 t/tap-signal.tap                                   |    2 +-
 t/test-driver-custom-multitest-recheck.sh          |    2 +-
 t/test-driver-custom-multitest-recheck2.sh         |    2 +-
 t/test-driver-custom-multitest.sh                  |    2 +
 t/test-driver-custom-no-extra-driver.sh            |    5 +-
 t/test-driver-custom-xfail-tests.sh                |    2 +-
 t/test-driver-fail.sh                              |    8 +-
 t/test-driver-strip-vpath.sh                       |   11 +-
 t/test-driver-trs-suffix-registered.sh             |   58 -
 t/test-extensions.sh                               |    2 +-
 t/test-metadata-global-log.sh                      |    1 +
 t/test-metadata-global-result.sh                   |   45 +-
 t/test-metadata-results.sh                         |   25 +-
 t/test-missing2.sh                                 |   54 -
 t/test-trs-basic.sh                                |    5 +-
 ...-tests-once.sh => test-trs-recover-parallel.sh} |   44 +-
 t/test-trs-recover2.sh                             |  133 --
 51 files changed, 759 insertions(+), 2088 deletions(-)
 delete mode 100644 t/CheckListOfTests.am
 delete mode 100644 t/list-of-tests.mk
 create mode 100755 t/parallel-tests-dynamic.sh
 create mode 100755 t/parallel-tests-longest-stem.sh
 copy t/{parallel-tests-once.sh => parallel-tests-no-repeat.sh} (65%)
 copy t/{parallel-tests8.sh => parallel-tests-srcdir-in-test-name.sh} (66%)
 copy t/{spy-phony.sh => spy-pattern-rules.sh} (57%)
 delete mode 100755 t/test-driver-trs-suffix-registered.sh
 delete mode 100755 t/test-missing2.sh
 copy t/{parallel-tests-once.sh => test-trs-recover-parallel.sh} (55%)
 delete mode 100755 t/test-trs-recover2.sh

diff --git a/.gitignore b/.gitignore
index 78b7aff..eb45fca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,7 +36,7 @@
 /t/wrap/aclocal-1.*
 /t/wrap/automake-1.*
 /defs-static
-/t/testsuite-part.am
+/testsuite-autodeps.am
 /t/*-w.tap
 /t/*-w.sh
 /t/depcomp-*.tap
diff --git a/Makefile.am b/Makefile.am
index 8c29aee..fafe586 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -341,7 +341,60 @@ AM_TAP_LOG_DRIVER_FLAGS = --merge
 
 EXTRA_DIST += t/ax/is
 
-TESTS = ## Will be updated later.
+# All tests, both hand-written and autogenerated.
+# IMPORTANT: This assumes that the autogenerated tests are placed
+#            in the $(srcdir) as well!
+all_TESTS = \
+  $(wildcard $(srcdir)/t/*.sh) \
+  $(wildcard $(srcdir)/t/*.tap) \
+  $(wildcard $(srcdir)/t/pm/*.pl)
+
+# This is to ensure longer-running tests will be run earlier, which is
+# useful when running the testsuite in parallel on multicore machines.
+# Here too we assume that the autogenerated tests are placed in $(srcdir).
+long_running_TESTS = \
+  $(srcdir)/t/add-missing.tap \
+  $(srcdir)/t/instspc.tap \
+  $(wildcard $(srcdir)/t/depcomp-*.tap) \
+  $(wildcard $(srcdir)/t/*libtool*.sh) \
+  $(wildcard $(srcdir)/t/lt*.sh) \
+  $(wildcard $(srcdir)/t/remake*.sh)
+
+TESTS = \
+  $(long_running_TESTS) \
+  $(filter-out $(long_running_TESTS), $(all_TESTS))
+
+EXTRA_DIST += $(TESTS)
+
+# FIXME: this "expected failures" are in truth an hack used to
+# FIXME: to verify that some incorrect usages of our perl libraries
+# FIXME: raise an error.  We should find a cleaner way to check that.
+perl_fake_XFAIL_TESTS = \
+  t/pm/Cond2.pl \
+  t/pm/Cond3.pl \
+  t/pm/DisjCon2.pl \
+  t/pm/DisjCon3.pl \
+  t/pm/Version2.pl \
+  t/pm/Version3.pl
+
+XFAIL_TESTS = \
+  t/all.sh \
+  t/yacc-bison-skeleton-cxx.sh \
+  t/yacc-bison-skeleton.sh \
+  t/cond17.sh \
+  t/gcj6.sh \
+  t/override-conditional-2.sh \
+  t/dist-pr109765.sh \
+  t/instdir-cond2.sh \
+  t/interp3.sh \
+  t/java-nobase.sh \
+  t/objext-pr10128.sh \
+  t/parallel-tests-many.sh \
+  t/pr8365-remake-timing.sh \
+  t/remake-am-pr10111.sh \
+  t/remake-m4-pr10111.sh \
+  t/txinfo5.sh \
+  $(perl_fake_XFAIL_TESTS)
 
 # Some testsuite-influential variables should be overridable from the
 # test scripts, but not from the environment.
@@ -367,35 +420,17 @@ AM_TESTS_ENVIRONMENT += AM_TESTS_REEXEC=no; export 
AM_TESTS_REEXEC;
 AM_TESTS_FD_REDIRECT = 9>&2
 AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
 
-# Hand-written tests.
+# Automatically-computed dependencies for tests.
+include $(srcdir)/testsuite-autodeps.am
 
-include $(srcdir)/t/list-of-tests.mk
-
-TESTS += $(handwritten_TESTS)
-EXTRA_DIST += $(handwritten_TESTS)
-
-# Automatically-generated tests wrapping hand-written ones.
-# Also, automatically-computed dependencies for tests.
-
-include $(srcdir)/t/testsuite-part.am
-
-TESTS += $(generated_TESTS)
-EXTRA_DIST += $(generated_TESTS)
-
-$(srcdir)/t/testsuite-part.am:
-       $(AM_V_at)rm -f t/testsuite-part.tmp $@
-       $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \
-         --srcdir $(srcdir) > t/testsuite-part.tmp
-       $(AM_V_at)chmod a-w t/testsuite-part.tmp
-       $(AM_V_at)mv -f t/testsuite-part.tmp $@
+$(srcdir)/autodeps.am: $(srcdir)/gen-testsuite-part
+       $(AM_V_at)rm -f testsuite-autodeps.tmp $@
+       $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part
+         --srcdir $(srcdir) > testsuite-autodeps.tmp
+       $(AM_V_at)chmod a-w testsuite-autodeps.tmp
+       $(AM_V_at)mv -f testsuite-autodeps.tmp $@
 EXTRA_DIST += gen-testsuite-part
 
-$(generated_TESTS) $(srcdir)/t/testsuite-part.am: \
-  $(srcdir)/gen-testsuite-part \
-  t/list-of-tests.mk \
-  Makefile.am \
-  $(handwritten_TESTS)
-
 # Static dependencies valid for each test case.
 check_SCRIPTS = t/wrap/aclocal-$(APIVERSION) t/wrap/automake-$(APIVERSION)
 dist_check_DATA = t/ax/plain-functions.sh t/ax/tap-functions.sh
@@ -429,10 +464,6 @@ check-no-repeated-test-name:
 check-local: check-no-repeated-test-name
 .PHONY: check-no-repeated-test-name
 
-## Checking the list of tests.
-test_subdirs = t t/pm
-include $(srcdir)/t/CheckListOfTests.am
-
 # Run the testsuite with the installed aclocal and automake.
 installcheck-local: installcheck-testsuite
 installcheck-testsuite:
diff --git a/NG-NEWS b/NG-NEWS
index 152fecc..99cb0bc 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -71,6 +71,39 @@ Parallel testsuite harness
   variables anymore.  These have always been meant for internal use only
   anyway.
 
+* The $(TESTS) and $(XFAIL_TESTS) variables are not anymore rewritten for
+  $(EXEEXT) appending.  The use of compiled programs in $(TESTS) still
+  works as before though, even on systems where $(EXEEXT) is non-empty,
+  thanks to a careful use of pattern rules.
+
+* The new implementation of the parallel-tests harness tries to defer
+  as much as possible processing on the $(TESTS) variable at make,
+  rather than doing it at automake time.  This as some positive effects
+  (described below), but also entails a minor annoyance.  When automake
+  runs, it cannot know anymore whether $(TESTS) contains or not any
+  entry with no recognized test suffix; as a consequence, it always
+  need the '$(LOG_DRIVER)' variable to be defined.  If it's not,
+  automake will define it to a proper invocation of the 'test-driver'
+  auxiliary script, and require that script to be present in the
+  config-aux directory (or bring it in if "--add-missing" is in use).
+  If you know you package won't make use of suffix-less tests (thus, in
+  particular, no use of compiled programs in $(TESTS)), you can avoid
+  requiring the 'test-driver' script by adding this line to your
+  configure.ac:
+    AC_SUBST([LOG_DRIVER], ['unused but required by automake'])
+
+* The parallel testsuite harness realizes whether an entry of $(TESTS)
+  start with $(srcdir) (as in "TESTS = $(srcdir)/foo.test"), and manages
+  to correctly create the corresponding '.log' and '.trs' files in the
+  build directory rather than in the source directory.
+
+* The contents of $(TESTS) are mostly analyzed at make runtime rather
+  than at automake runtime, so that it is now possible to use GNU make
+  advanced features (like specific builtins or user-defined functions)
+  in the definition of $(TESTS); for example, the following should now
+  work as expected:
+    TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
+
 Miscellaneous
 =============
 
diff --git a/automake.in b/automake.in
index 86da5a0..bb019d4 100644
--- a/automake.in
+++ b/automake.in
@@ -4706,27 +4706,24 @@ sub handle_tests_dejagnu
     $output_rules .= file_contents ('dejagnu', new Automake::Location);
 }
 
-sub handle_per_suffix_test
+sub handle_per_suffix_test($)
 {
-  my ($test_suffix, %transform) = @_;
-  my ($pfx, $generic, $parallel_tests_option, $am_exeext);
+  my $test_suffix = shift;
+  my ($pfx, $parallel_tests_option, $am_exeext);
   prog_error ("called with 'parallel-tests' option not set")
     unless $parallel_tests_option = option 'parallel-tests';
   if ($test_suffix eq '')
     {
       $pfx = '';
-      $generic = 0;
-      $am_exeext = 'FALSE';
     }
   else
     {
       prog_error ("test suffix '$test_suffix' lacks leading dot")
         unless $test_suffix =~ m/^\.(.*)/;
       $pfx = uc ($1) . '_';
-      $generic = 1;
-      $am_exeext = exists $configure_vars{'EXEEXT'} ? 'am__EXEEXT'
-                                                    : 'FALSE';
     }
+  $am_exeext = exists $configure_vars{'EXEEXT'} ? 'am__EXEEXT'
+                                                  : 'FALSE';
   # The "test driver" program, deputed to handle tests protocol used by
   # test scripts.  By default, it's assumed that no protocol is used,
   # so we fall back to the old "parallel-tests" behaviour, implemented
@@ -4740,11 +4737,9 @@ sub handle_per_suffix_test
                        INTERNAL);
     }
   $output_rules .= file_contents ('check2', new Automake::Location,
-                                   GENERIC => $generic,
                                    PFX => $pfx,
                                    EXT => $test_suffix,
-                                   am__EXEEXT => $am_exeext,
-                                   %transform);
+                                   am__EXEEXT => $am_exeext);
 }
 
 # is_valid_test_extension ($EXT)
@@ -4786,27 +4781,12 @@ sub handle_tests
                                       PARALLEL_TESTS => !! option 
'parallel-tests',
                                        CHECK_DEPS => $check_deps);
 
-      # Tests that are known programs should have $(EXEEXT) appended.
-      # For matching purposes, we need to adjust XFAIL_TESTS as well.
-      append_exeext { exists $known_programs{$_[0]} } 'TESTS';
-      append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
-       if (var ('XFAIL_TESTS'));
-
       if (my $parallel_tests = option 'parallel-tests')
         {
          define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
          my $suff = '.test';
-         my $at_exeext = '';
-         my $handle_exeext = exists $configure_vars{'EXEEXT'};
-         if ($handle_exeext)
-           {
-             $at_exeext = subst ('EXEEXT');
-             $suff = $at_exeext  . ' ' . $suff;
-           }
-          if (! var 'TEST_EXTENSIONS')
-            {
-             define_variable ('TEST_EXTENSIONS', $suff, INTERNAL);
-            }
+         define_variable ('TEST_EXTENSIONS', '.test', INTERNAL)
+            if (! var 'TEST_EXTENSIONS');
           my $var = var 'TEST_EXTENSIONS';
           # Currently, we are not able to deal with conditional contents
           # in TEST_EXTENSIONS.
@@ -4823,76 +4803,47 @@ sub handle_tests
                     "invalid test extensions: @invalid_test_suffixes";
             }
           @test_suffixes = grep { is_valid_test_extension $_ } @test_suffixes;
-         if ($handle_exeext)
-           {
-             unshift (@test_suffixes, $at_exeext)
-               unless $test_suffixes[0] eq $at_exeext;
-           }
-         unshift (@test_suffixes, '');
-
-         transform_variable_recursively
-           ('TESTS', 'TEST_LOGS', 'am__testlogs', 1, INTERNAL,
-             sub {
-               my ($subvar, $val, $cond, $full_cond) = @_;
-               my $obj = $val;
-               return $obj
-                 if $val =~ /address@hidden@$/;
-               $obj =~ s/\$\(EXEEXT\)$//o;
-
-               if ($val =~ /(\$\((top_)?srcdir\))\//o)
-                 {
-                   msg ('error', $subvar->rdef ($cond)->location,
-                        "parallel-tests: using '$1' in TESTS is currently 
broken: '$val'");
-                 }
-
-               foreach my $test_suffix (@test_suffixes)
-                 {
-                   next
-                     if $test_suffix eq $at_exeext || $test_suffix eq '';
-                   return substr ($obj, 0, length ($obj) - length 
($test_suffix)) . '.log'
-                     if substr ($obj, - length ($test_suffix)) eq $test_suffix;
-                 }
-               my $base = $obj;
-               $obj .= '.log';
-                handle_per_suffix_test ('',
-                                        OBJ => $obj,
-                                        BASE => $base,
-                                        SOURCE => $val);
-               return $obj;
-             });
-
-         my $nhelper=1;
-         my $prev = 'TESTS';
-         my $post = '';
-         my $last_suffix = $test_suffixes[$#test_suffixes];
-         my $cur = '';
+          # It is *imperative* that the empty 'suffix goes last.
+          # Otherwise, a declaration like "TESTS = all.test" would cause GNU
+          # make to mistakenly try to build the 'all.log' and 'all.trs' files
+          # from a non-existent 'all' program (because the Makefile contains
+          # an explicit 'all' target) rather than from the 'all.test' script,
+          # thus causing all sort of mishaps and confusion.
+         push @test_suffixes, '';
+
+          define_variable ('am__test_logs1',
+                           '$(patsubst %,%.log,$(strip $(am__cooked_tests)))',
+                           INTERNAL);
+         my $nhelper = 1;
          foreach my $test_suffix (@test_suffixes)
            {
-             if ($test_suffix eq $last_suffix)
-               {
-                 $cur = 'TEST_LOGS';
-               }
-             else
-               {
-                 $cur = 'am__test_logs' . $nhelper;
-               }
-             define_variable ($cur,
-               '$(' . $prev . ':' . $test_suffix . $post . '=.log)', INTERNAL);
-             $post = '.log';
-             $prev = $cur;
-             $nhelper++;
-             if ($test_suffix ne $at_exeext && $test_suffix ne '')
-               {
-                  handle_per_suffix_test ($test_suffix,
-                                          OBJ => '',
-                                          BASE => '$*',
-                                          SOURCE => '$<');
-               }
+              handle_per_suffix_test ($test_suffix);
+              my @cooked_test_suffixes = ($test_suffix);
+              push @cooked_test_suffixes, ($test_suffix . '$(EXEEXT)')
+                if exists $configure_vars{'EXEEXT'};
+              foreach my $cooked_test_suffix (@cooked_test_suffixes)
+                {
+                  my $old_var = 'am__test_logs' . $nhelper++;
+                  my $cur_var = 'am__test_logs' . $nhelper;
+                  define_variable (
+                    $cur_var,
+                    "\$($old_var:$cooked_test_suffix.log=.log)",
+                    INTERNAL);
+                }
            }
+         define_variable ('TEST_LOGS', "\$(am__test_logs$nhelper)", INTERNAL);
          $clean_files{'$(TEST_LOGS)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_LOGS:.log=.trs)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_SUITE_LOG)'} = MOSTLY_CLEAN;
        }
+      else
+        {
+          # Tests that are known programs should have $(EXEEXT) appended.
+          # For matching purposes, we need to adjust XFAIL_TESTS as well.
+          append_exeext { exists $known_programs{$_[0]} } 'TESTS';
+          append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
+           if (var ('XFAIL_TESTS'));
+        }
     }
 }
 
diff --git a/bootstrap b/bootstrap
index 814aedb..93262f0 100755
--- a/bootstrap
+++ b/bootstrap
@@ -103,9 +103,9 @@ dosubst m4/amversion.in m4/amversion.m4
 dosubst automake.in automake.tmp
 
 # Create required makefile snippets.
-$PERL ./gen-testsuite-part > t/testsuite-part.tmp
-chmod a-w t/testsuite-part.tmp
-mv -f t/testsuite-part.tmp t/testsuite-part.am
+$PERL ./gen-testsuite-part > testsuite-autodeps.tmp
+chmod a-w testsuite-autodeps.tmp
+mv -f testsuite-autodeps.tmp testsuite-autodeps.am
 
 # Run the autotools.
 # Use '-I' here so that our own *.m4 files in m4/ gets included,
diff --git a/doc/automake.texi b/doc/automake.texi
index 2661af5..f15c3e5 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -6938,8 +6938,9 @@ bin_PROGRAMS = liver$(EXEEXT)
 The targets Automake generates are likewise given the @samp{$(EXEEXT)}
 extension.
 
-The variables @code{TESTS} and @code{XFAIL_TESTS} (@pxref{Simple Tests})
-are also rewritten if they contain filenames that have been declared as
+When the @option{parallel-tests} option is in use, the variables
address@hidden and @code{XFAIL_TESTS} (@pxref{Simple Tests}) are also
+rewritten if they contain filenames that have been declared as
 programs in the same @file{Makefile}.  (This is mostly useful when some
 programs from @code{check_PROGRAMS} are listed in @code{TESTS}.)
 
@@ -9202,10 +9203,6 @@ the inference rules generated by @command{automake} can 
apply.  For
 literal test names, @command{automake} can generate per-target rules
 to avoid this limitation.
 
-Please note that it is currently not possible to use @code{$(srcdir)/}
-or @code{$(top_srcdir)/} in the @code{TESTS} variable.  This technical
-limitation is necessary to avoid generating test logs in the source tree.
-
 @node Custom Test Drivers
 @section Custom Test Drivers
 
diff --git a/gen-testsuite-part b/gen-testsuite-part
index dbf8be3..d181b98 100755
--- a/gen-testsuite-part
+++ b/gen-testsuite-part
@@ -66,10 +66,10 @@ sub atomic_write ($$;$)
 sub line_match ($$)
 {
   my ($re, $file) = (shift, shift);
-  # Try both builddir and srcdir, with builddir first, to play nice
-  # with VPATH builds.
-  open (FH, "<$file") or open (FH, "<$srcdir/$file")
-    or die "$me: cannot open file '$file': $!\n";
+  # Test scripts should always be in srcdir, whether auto-generated
+  # or not.
+  open (FH, "<$srcdir/$file")
+    or die "$me: cannot open file '$srcdir/$file': $!\n";
   my $ret = 0;
   while (defined (my $line = <FH>))
     {
@@ -93,33 +93,31 @@ sub write_wrapper_script ($$$)
     # This file has been automatically generated.  DO NOT EDIT BY HAND!
     . ./defs-static || exit '99';
     $shell_setup_code
-    # In the spirit of VPATH, we prefer a test in the build tree
-    # over one in the source tree.
-    for dir in . "\$am_top_srcdir"; do
-      if test -f "\$dir/$wrapped_test"; then
-        echo "\$0: will source \$dir/$wrapped_test"
-        . "\$dir/$wrapped_test"; exit "\$?"
-      fi
-    done
-    echo "\$0: cannot find wrapped test '$wrapped_test'" >&2
-    exit '99'
+    w="\$am_top_srcdir/$wrapped_test"
+    if test -f "\$w"; then
+      echo "\$0: will source '\$w'"
+      . "\$w"
+      exit "\$?"
+    else
+      echo "\$0: cannot find wrapped test '\$w'" >&2
+      exit '99'
+    fi
 EOF
 }
 
 sub get_list_of_tests ()
 {
-  my $make = defined $ENV{MAKE} ? $ENV{MAKE} : "make";
-  # Unset MAKEFLAGS, for when we are called from make itself.
-  my $cmd = "MAKEFLAGS= && unset MAKEFLAGS && cd '$srcdir' && "
-            . "$make -s -f t/list-of-tests.mk print-list-of-tests";
-  my @tests_list = split /\s+/, `$cmd`;
+  my @tests_list = split /\s+/, `cd '$srcdir' && ls t/*.sh t/*.tap`;
+  # Tests whose names matches this pattern are already autogenerated,
+  # so we shouldn't re-process them.
+  @tests_list = grep { !/-w[0-9]*\.(sh|tap)$/ } @tests_list;
   die "$me: cannot get list of tests\n" unless $? == 0 && @tests_list;
   my $ok = 1;
   foreach my $test (@tests_list)
     {
-      # Respect VPATH builds.
-      next if -f $test || -f "$srcdir/$test";
-      warn "$me: test '$test' not found\n";
+      my $test_path = "$srcdir/$test";
+      next if -f $test_path;
+      warn "$me: test '$test_path' not found\n";
       $ok = 0;
     }
   die "$me: some test scripts not found\n" if !$ok;
@@ -272,16 +270,15 @@ my %test_generators =
 parse_options @ARGV;
 
 my @all_tests = get_list_of_tests;
-my @generated_tests = (); # Will be updated later.
 
 print "## -*- Makefile -*-\n";
-print "## Generated by $me.  DO NOT EDIT BY HAND!\n\n";
+print "## Generated by $me.  DO NOT EDIT BY HAND!\n";
 
 print <<EOF;
 
-## --------------------------------------------- ##
-##  Autogenerated tests and their dependencies.  ##
-## --------------------------------------------- ##
+## --------------------------------------- ##
+##  Dependencies for autogenerated tests.  ##
+## --------------------------------------- ##
 
 EOF
 
@@ -298,9 +295,7 @@ while (my ($k, $g) = each %test_generators)
       {
         (my $base = $wrapped_test) =~ s/\.([^.]*)$//;
         my $suf = $1 or die "$me: test '$wrapped_test' lacks a suffix\n";
-        my $wrapper_test =  "$base-w.$suf";
-        # Register wrapper test as "autogenerated".
-        push @generated_tests, $wrapper_test;
+        my $wrapper_test =  "$srcdir/$base-w.$suf";
         # Create wrapper test.
         atomic_write $wrapper_test,
                      sub { write_wrapper_script $_[0], $wrapped_test,
@@ -321,13 +316,13 @@ while (my ($k, $g) = each %test_generators)
 
 print <<EOF;
 
-## ---------------------------------------------------- ##
-##  Ad-hoc autogenerated tests and their dependencies.  ##
-## ---------------------------------------------------- ##
+## ---------------------------------------------- ##
+##  Dependencies for ad-hoc autogenerated tests.  ##
+## ---------------------------------------------- ##
 
 EOF
 
-print "## Tests on automatic dependency tracking (see 'depcomp.sh').\n";
+print "## Tests on automatic dependency tracking (see t/ax/depcomp.sh)\n";
 
 # Key: depmode, value: list of required programs.
 my %depmodes =
@@ -362,11 +357,9 @@ foreach my $lt (TRUE, FALSE)
             "depmode=$m",
             "depcomp_with_libtool=" . ($lt ? "yes" : "no"),
           );
-        my $test = "t/depcomp" . ($lt ? "-lt-" : "-") . $m . ".tap";
-        # Register wrapper test as "autogenerated" ...
-        push @generated_tests, $test;
-        # ... and create it.
-        atomic_write ($test, sub
+        my $testname = "depcomp" . ($lt ? "-lt-" : "-") . $m . ".tap";
+        # Create wrapper test.
+        atomic_write ("$srcdir/t/$testname", sub
           {
             my $file_handle = shift;
             print $file_handle unindent <<EOF;
@@ -383,16 +376,11 @@ EOF
       }
    }
 
-# Update generated makefile fragment to account for all the generated tests.
-print "generated_TESTS =\n";
-map { print "generated_TESTS += $_\n" } @generated_tests;
-
 # The test scripts are scanned for automatic dependency generation *after*
 # the generated tests have been created, so they too can be scanned.  To
 # do so correctly, we need to update the list in '@all_tests' to make it
 # comprise also the freshly-generated tests.
-
-push @all_tests, @generated_tests;
address@hidden = get_list_of_tests;
 
 print <<EOF;
 
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index f7bf545..27df7eb 100644
--- a/lib/Automake/Rule.pm
+++ b/lib/Automake/Rule.pm
@@ -618,23 +618,17 @@ sub _maybe_warn_about_duplicated_target ($$$$$$)
     {
       if ($oldowner == RULE_USER)
         {
-          # Ignore '%'-style pattern rules.  We'd need the
-          # dependencies to detect duplicates, and they are
-          # already diagnosed as unportable by -Wportability.
-          if ($target !~ /^[^%]*%[^%]*$/)
-            {
-              ## FIXME: Presently we can't diagnose duplicate user rules
-              ## because we don't distinguish rules with commands
-              ## from rules that only add dependencies.  E.g.,
-              ##   .PHONY: foo
-              ##   .PHONY: bar
-              ## is legitimate. (This is phony.test.)
-
-              # msg ('syntax', $where,
-              #      "redefinition of '$target'$condmsg ...", partial => 1);
-              # msg_cond_rule ('syntax', $cond, $target,
-              #                "... '$target' previously defined here");
-            }
+          ## FIXME: Presently we can't diagnose duplicate user rules
+          ## because we don't distinguish rules with commands
+          ## from rules that only add dependencies.  E.g.,
+          ##   .PHONY: foo
+          ##   .PHONY: bar
+          ## is legitimate. (This is phony.test.)
+
+          # msg ('syntax', $where,
+          #      "redefinition of '$target'$condmsg ...", partial => 1);
+          # msg_cond_rule ('syntax', $cond, $target,
+          #                "... '$target' previously defined here");
         }
       else
         {
@@ -704,9 +698,13 @@ sub _conditionals_for_rule ($$$$)
 
   return $cond if !$message; # No ambiguity.
 
+  # Ignore possible ambiguity in '%'-style pattern rules.  We'd need the
+  # dependencies to detect duplicates, and would be overkill anyway, worth
+  # the possibility of annoying false positives.
+  return $cond if $target =~ /%/;
+
   if ($owner == RULE_USER)
     {
-      # For user rules, just diagnose the ambiguity.
       msg 'syntax', $where, "$message ...", partial => 1;
       msg_cond_rule ('syntax', $ambig_cond, $target,
                      "... '$target' previously defined here");
@@ -774,7 +772,10 @@ sub define ($$$$$)
   my $tdef = _rule_defn_with_exeext_awareness ($target, $cond, $where);
 
   # See whether this is a duplicated target declaration.
-  if ($tdef)
+  # Ignore '%'-style pattern rules.  We'd need the dependencies to detect
+  # duplicates, and would be overkill anyway, worth the possibility of
+  # annoying false positives.
+  if ($tdef && $target !~ /%/)
     {
       # Diagnose invalid target redefinitions, if any.  Note that some
       # target redefinitions are valid (e.g., for multiple-targets
diff --git a/lib/am/check.am b/lib/am/check.am
index d470437..9c20892 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -53,6 +53,15 @@ if %?PARALLEL_TESTS%
 ## of more test metadata, and the use of custom test derivers and protocols
 ## (among them, TAP).
 
+# Required to support explicit use of $(srcdir) in TESTS entries.
+# That might actually be very useful in practice, for example in usages
+# like this:
+#   TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
+# Removing the '$(srcdir)' in there would cause the idiom to break in
+# VPATH builds.
+am__cooked_tests = $(patsubst $(srcdir)/%,%,$(strip $(TESTS)))
+am__cooked_xfail_tests = $(patsubst $(srcdir)/%,%,$(strip $(XFAIL_TESTS)))
+
 # Restructured Text title and section.
 am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
 am__rst_section = { sed 'p;s/./=/g;' && echo; }
@@ -82,100 +91,63 @@ srcdir=$(srcdir); export srcdir;                   \
 test x$(@D) = x. || test -d $(@D) || $(MKDIR_P) $(@D) || exit $$?; \
 f='$(patsubst $(srcdir)/%,%,$<)';                      \
 ## We need to invoke the test in way that won't cause a PATH search.
-case $< in */*) tst=$<;; *) tst=./$<;; esac;           \
+## Quotes around '$<' are required to avoid extra errors when a circular
+## dependency is detected (e.g., because $(TEST_SUITE_LOG) is in
+## $(TEST_LOGS)), because in that case '$<' expands to empty and an
+## unquote usage of it could cause syntax errors in the shell.
+case '$<' in */*) tst='$<';; *) tst=./'$<';; esac;     \
 if test -n '$(DISABLE_HARD_ERRORS)'; then              \
   am__enable_hard_errors=no;                           \
 else                                                   \
   am__enable_hard_errors=yes;                          \
 fi;                                                    \
-case " $(strip $(XFAIL_TESTS)) " in                    \
+case " $(am__cooked_xfail_tests) " in                  \
   *" $$f "*) am__expect_failure=yes;;                  \
           *) am__expect_failure=no;;                   \
 esac;                                                  \
 $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
 
-# A shell command to get the names of the tests scripts with any registered
-# extension removed (i.e., equivalently, the names of the test logs, with
-# the '.log' extension removed).  The result is saved in the shell variable
-# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.
-# It also works around the GNU make 3.80 bug where trailing whitespace in
-# "TESTS = foo.test $(empty)" causes $(TESTS_LOGS) to erroneously expand to
-# "foo.log .log".
-am__set_TESTS_bases = bases='$(strip $(TEST_LOGS:.log=))'
-
-# Recover from deleted '.trs' file; this should ensure that
-# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
-# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
-# to avoid problems with "make -n".
-.log.trs:
-       rm -f $< $@
-       $(MAKE) $<
+# The names of the tests scripts with any registered extension removed
+# (i.e., equivalently, the names of the test logs, with the '.log' suffix
+# stripped), and the name of the test result files (i.e., equivalently, the
+# names of the test logs, with the '.log' suffix substituted by the '.trs'
+# suffix).  This honors runtime overriding of TESTS and TEST_LOGS.  It
+# also works around the GNU make 3.80 bug where trailing whitespace in
+# "TESTS = foo.test $(empty)" causes $(TESTS_LOGS) to erroneously expand
+# to "foo.log .log".
+am__TEST_BASES   = $(patsubst %.log,%,$(strip $(TEST_LOGS)))
+am__TEST_RESULTS = $(patsubst %.log,%.trs,$(strip $(TEST_LOGS)))
 
-$(TEST_SUITE_LOG): $(TEST_LOGS)
-       @$(am__set_TESTS_bases); \
-## Helper shell function, tells whether a path refers to an existing,
-## regular, readable file.
-       am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
-## We need to ensures that all the required '.trs' and '.log' files will
-## be present and readable.  The direct dependencies of $(TEST_SUITE_LOG)
-## only ensure that all the '.log' files exists; they don't ensure that
-## the '.log' files are readable, and worse, they don't ensure that the
-## '.trs' files even exist.
-       redo_bases=`for i in $$bases; do \
-                     am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
-                   done`; \
-       if test -n "$$redo_bases"; then \
-## Uh-oh, either some '.log' files were unreadable, or some '.trs' files
-## were missing (or unreadable).  We need to re-run the corresponding
-## tests in order to re-create them.
-         redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
-         redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
-         if $(am__make_dryrun); then :; else \
-## Break "rm -f" into two calls to minimize the possibility of exceeding
-## command line length limits.
-           rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
-         fi; \
-       fi; \
-## Use a trick to to ensure that we don't go into an infinite recursion
-## in case a test log in $(TEST_LOGS) is the same as $(TEST_SUITE_LOG).
-## Yes, this has already happened in practice.  Sigh!
-       if test -n "$$am__remaking_logs"; then \
-         echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
-              "recursion detected" >&2; \
-       else \
-         am__remaking_logs=yes $(MAKE) $$redo_logs; \
-       fi; \
-       if $(am__make_dryrun); then :; else \
-## Sanity check: each unreadable or non-existent test result file should
-## has been properly remade at this point, as should the corresponding log
-## file.
-         st=0;  \
-         errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
-         for i in $$redo_bases; do \
-           test -f $$i.trs && test -r $$i.trs \
-             || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
-           test -f $$i.log && test -r $$i.log \
-             || { echo "$$errmsg $$i.log" >&2; st=1; }; \
-         done; \
-         test $$st -eq 0 || exit 1; \
-       fi
-## We need a new subshell to work portably with "make -n", since the
-## previous part of the recipe contained a $(MAKE) invocation.
-       @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+$(TEST_SUITE_LOG): $(TEST_LOGS) $(am__TEST_RESULTS)
+       @$(am__sh_e_setup); $(am__tty_colors); \
+       fatal () { echo "fatal: making $@: $$*" >&2; exit 1; }; \
+## Detect a possible circular dependency, and error out.
+       case ' $(strip $(TEST_LOGS)) ' in *' $(TEST_SUITE_LOG) '*) \
+         fatal "depends on itself (check TESTS content)";; \
+       esac; \
        ws='[   ]'; \
-## List of test result files.
-       results=`for b in $$bases; do echo $$b.trs; done`; \
-       test -n "$$results" || results=/dev/null; \
+       count_result () \
+       { \
+         r='$(strip $(am__TEST_RESULTS))'; \
+         r=`grep "^$$ws*:test-result:$$ws*$${1-}" $$r </dev/null`; \
+## Catch I/O errors, and complain accordingly.
+         test $$? -le 1 || fatal "I/O error reading test results"; \
+         case $$r in \
+           "") echo 0;; \
+           * ) printf '%s\n' "$$r" | wc -l;; \
+         esac; \
+       }; \
 ## Prepare data for the test suite summary.  These do not take into account
 ## unreadable test results, but they'll be appropriately updated later if
 ## needed.
-       all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
-       pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
-       fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
-       skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
-       xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
-       xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
-       error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+       all=`count_result` \
+         && pass=` count_result PASS` \
+         && fail=` count_result FAIL` \
+         && skip=` count_result SKIP` \
+         && xfail=`count_result XFAIL` \
+         && xpass=`count_result XPASS` \
+         && error=`count_result ERROR` \
+         || exit 1; \
 ## Whether the testsuite was successful or not.
        if test `expr $$fail + $$xpass + $$error` -eq 0; then \
          success=true; \
@@ -188,14 +160,15 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 ## When writing the test summary to the console, we want to color a line
 ## reporting the count of some result *only* if at least one test
 ## experienced such a result.  This function is handy in this regard.
-       result_count () \
+       display_result_count () \
        { \
            if test x"$$1" = x"--maybe-color"; then \
              maybe_colorize=yes; \
            elif test x"$$1" = x"--no-color"; then \
              maybe_colorize=no; \
            else \
-             echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+             echo "$@: invalid 'display_result_count' usage" >&2; \
+             exit 4; \
            fi; \
            shift; \
            desc=$$1 count=$$2; \
@@ -211,23 +184,25 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 ## and a possibly-colorized one for console output.
        create_testsuite_report () \
        { \
-         result_count $$1 "TOTAL:" $$all   "$$brg"; \
-         result_count $$1 "PASS: " $$pass  "$$grn"; \
-         result_count $$1 "SKIP: " $$skip  "$$blu"; \
-         result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
-         result_count $$1 "FAIL: " $$fail  "$$red"; \
-         result_count $$1 "XPASS:" $$xpass "$$red"; \
-         result_count $$1 "ERROR:" $$error "$$mgn"; \
+         opts=$$*; \
+         display_result_count $$opts "TOTAL:" $$all   "$$brg"; \
+         display_result_count $$opts "PASS: " $$pass  "$$grn"; \
+         display_result_count $$opts "SKIP: " $$skip  "$$blu"; \
+         display_result_count $$opts "XFAIL:" $$xfail "$$lgn"; \
+         display_result_count $$opts "FAIL: " $$fail  "$$red"; \
+         display_result_count $$opts "XPASS:" $$xpass "$$red"; \
+         display_result_count $$opts "ERROR:" $$error "$$mgn"; \
        }; \
 ## Write "global" testsuite log.
-       {                                                               \
+       if {                                                            \
+         st=0;                                                         \
          echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |       \
            $(am__rst_title);                                           \
          create_testsuite_report --no-color;                           \
          echo;                                                         \
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
-         for i in $$bases; do                                          \
+         bases='$(am__TEST_BASES)'; for i in $$bases; do               \
 ## FIXME: one fork per test -- this is horrendously inefficient!
            if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \
                 >/dev/null; then continue; \
@@ -242,15 +217,17 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
            test -n "$$glob_res" || glob_res=RUN; \
 ## Write the name and result of the test as an RST section title.
            echo "$$glob_res: $$i" | $(am__rst_section); \
-## If we should have remade any unreadable '.log', above.
-           if test ! -r $$i.log; then \
-             echo "fatal: making $@: $$i.log is unreadable" >&2; \
-             exit 1; \
-           fi; \
-           cat $$i.log; echo; \
+## Register any failure in reading test logs, to report an error later.
+           cat $$i.log || st=1; \
+           echo; \
          done; \
-       } >$(TEST_SUITE_LOG).tmp;                                       \
-       mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);                     \
+         test $$st -eq 0; \
+       } >$(TEST_SUITE_LOG).tmp; then \
+         mv -f $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+       else \
+         rm -f $(TEST_SUITE_LOG).tmp; \
+         fatal "I/O error reading test logs"; \
+       fi; \
 ## Emit the test summary on the console.
        if $$success; then                                              \
          col="$$grn";                                                  \
@@ -273,12 +250,6 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          fi;                                                           \
          echo "$$col$$br$$std";                                        \
        fi;                                                             \
-## Be sure to exit with the proper exit status.  The use of "exit 1" below
-## is required to work around a FreeBSD make bug (present only when running
-## in concurrent mode).  See automake bug#9245:
-##  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9245>
-## and FreeBSD PR bin/159730:
-##  <http://www.freebsd.org/cgi/query-pr.cgi?pr=159730>.
        $$success || exit 1
 
 RECHECK_LOGS = $(TEST_LOGS)
@@ -310,7 +281,7 @@ check-TESTS recheck:
 ## we rely on .PHONY to work portably.
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
        @ws='[  ]'; \
-       log_list='' trs_list=''; $(am__set_TESTS_bases); \
+       log_list='' trs_list=''; bases='$(am__TEST_BASES)'; \
        for i in $$bases; do \
 ## If running a "make recheck", we must only consider tests that had an
 ## unexpected outcome (FAIL or XPASS) in the earlier run.  In particular,
diff --git a/lib/am/check2.am b/lib/am/check2.am
index fce5498..19aef63 100644
--- a/lib/am/check2.am
+++ b/lib/am/check2.am
@@ -19,8 +19,8 @@ am__runtest = \
   $(am__check_pre) \
   $($(1)LOG_DRIVER) \
   --test-name "$$f" \
-  --log-file $(2).log \
-  --trs-file $(2).trs \
+  --log-file $*.log \
+  --trs-file $*.trs \
   $(am__common_driver_flags) \
   $(AM_$(1)LOG_DRIVER_FLAGS) \
   $($(1)LOG_DRIVER_FLAGS) \
@@ -33,15 +33,14 @@ am__runtest = \
 endif %?FIRST%
 
 ## From a test file to a .log and .trs file.
-?GENERIC?%EXT%.log:
-?!GENERIC?%OBJ%: %SOURCE%
-       @$(call am__runtest,%PFX%,%BASE%)
+%.log %.trs: %%EXT%
+       @$(call am__runtest,%PFX%)
 
 ## If no programs are built in this package, then this rule is removed
 ## at automake time.  Otherwise, %am__EXEEXT% expands to a configure time
 ## conditional, true if $(EXEEXT) is nonempty, thus this rule does not
 ## conflict with the previous one.
 if %am__EXEEXT%
-?GENERIC?%EXT%$(EXEEXT).log:
-       @$(call am__runtest,%PFX%,%BASE%)
+%.log %.trs: %%EXT%$(EXEEXT)
+       @$(call am__runtest,%PFX%)
 endif %am__EXEEXT%
diff --git a/syntax-checks.mk b/syntax-checks.mk
index 9d7681b..d024867 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -94,10 +94,6 @@ $(syntax_check_rules): automake aclocal
 maintainer-check: $(syntax_check_rules)
 .PHONY: maintainer-check $(syntax_check_rules)
 
-## Check that the list of tests given in the Makefile is equal to the
-## list of all test scripts in the Automake testsuite.
-maintainer-check: maintainer-check-list-of-tests
-
 ## Look for test whose names can cause spurious failures when used as
 ## first argument to AC_INIT (chiefly because they might contain an
 ## m4/m4sugar builtin or macro name).
diff --git a/t/CheckListOfTests.am b/t/CheckListOfTests.am
deleted file mode 100644
index a3913f2..0000000
--- a/t/CheckListOfTests.am
+++ /dev/null
@@ -1,68 +0,0 @@
-## -*- Automake -*-
-##
-## Copyright (C) 2011-2012 Free Software Foundation, Inc.
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2, or (at your option)
-## any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-##
-
-## Temporary files used in the 'check-list-of-tests' recipe.
-am__tmk = tests-in-makefile-list.tmp
-am__tfs = tests-on-filesystem-list.tmp
-am__tdf = diff-in-tests-lists.tmp
-
-## Check that the list of tests given in the Makefile is equal to the
-## list of all test scripts in the Automake testsuite.
-.PHONY: maintainer-check-list-of-tests
-maintainer-check-list-of-tests:
-## Prefer unified diffs over plain diffs, for readability.
-        @if diff -u /dev/null /dev/null >/dev/null 2>&1; then \
-          diff='diff -u'; \
-        else \
-          diff='diff'; \
-        fi; \
-## List of tests in Makefile.
-        lst='$(expected_list_of_tests)'; \
-        test -n "$$lst" || lst='$(TESTS)'; \
-        for t in $$lst; do \
-          echo "$$t"; \
-        done | sort >$(am__tmk); \
-## List of subdirs where to look for tests.
-        dirs='$(test_subdirs)'; \
-        test -n "$$dirs" || dirs=.; \
-## List of tests on filesystem.  Be careful to cater for VPATH builds too.
-        test_extensions='$(TEST_EXTENSIONS)'; \
-        for ext in $$test_extensions; do \
-          for dir in $$dirs; do \
-            ls $$dir/*$$ext 2>/dev/null; \
-            if test $(srcdir) != $(builddir); then \
-              ($(am__cd) $(srcdir) && ls $$dir/*$$ext 2>/dev/null); \
-            fi; \
-          done; \
-        done | sed 's,^\./,,' | sort | uniq >$(am__tfs); \
-## Compare the two lists, complain if they differ.
-        if $$diff $(am__tmk) $(am__tfs) >$(am__tdf); then \
-           result=0; \
-        else \
-           echo '$@: list of tests in Makefile an on filesystem differ' >&2; \
-           echo "+ $$diff in-makefile on-filesystem" >&2; \
-           cat $(am__tdf) >&2; \
-           result=1; \
-        fi; \
-        rm -f $(am__tmk) $(am__tfs) $(am__tdf); \
-        exit $$result;
-
-.PHONY: clean-maintcheck-testslist-tmp
-clean-local: clean-maintcheck-testslist-tmp
-clean-maintcheck-testslist-tmp:
-       rm -f $(am__tmk) $(am__tfs) $(am__tdf)
diff --git a/t/check7.sh b/t/check7.sh
index 1003b55..962cbe0 100755
--- a/t/check7.sh
+++ b/t/check7.sh
@@ -59,9 +59,12 @@ $AUTOMAKE -a
 
 ./configure
 $MAKE check
-$MAKE EXEEXT=.bin print-xfail-tests >stdout || { cat stdout; Exit 1; }
-cat stdout
-$FGREP 'BEG: a.bin b c.bin d.bin :END' stdout
+
+if test x"$am_parallel_tests" != x"yes"; then
+  $MAKE EXEEXT=.bin print-xfail-tests >stdout || { cat stdout; Exit 1; }
+  cat stdout
+  $FGREP 'BEG: a.bin b c.bin d.bin :END' stdout
+fi
 
 $MAKE distcheck
 
diff --git a/t/exeext4.sh b/t/exeext4.sh
index 298879d..53c37df 100755
--- a/t/exeext4.sh
+++ b/t/exeext4.sh
@@ -17,6 +17,7 @@
 # Make sure $(EXEEXT) is appended to programs and to tests that are
 # programs, but not to @address@hidden
 
+am_parallel_tests=no
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
deleted file mode 100644
index 57bb8ad..0000000
--- a/t/list-of-tests.mk
+++ /dev/null
@@ -1,1274 +0,0 @@
-## Makefile fragment that holds the list of test scripts of the automake
-## testsuite.  This fragment is meant to be included by the Makefile.am,
-## but also to be executed directly by make when bootstrapping automake.
-
-## Copyright (C) 2011-2012 Free Software Foundation, Inc.
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2, or (at your option)
-## any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# FIXME: this "expected failures" are in truth an hack used to
-# FIXME: to verify that some incorrect usages of our perl libraries
-# FIXME: raise an error.  We should find a cleaner way to check that.
-perl_fake_XFAIL_TESTS = \
-t/pm/Cond2.pl \
-t/pm/Cond3.pl \
-t/pm/DisjCon2.pl \
-t/pm/DisjCon3.pl \
-t/pm/Version2.pl \
-t/pm/Version3.pl
-
-XFAIL_TESTS = \
-t/all.sh \
-t/yacc-bison-skeleton-cxx.sh \
-t/yacc-bison-skeleton.sh \
-t/cond17.sh \
-t/gcj6.sh \
-t/override-conditional-2.sh \
-t/dist-pr109765.sh \
-t/instdir-cond2.sh \
-t/interp3.sh \
-t/java-nobase.sh \
-t/objext-pr10128.sh \
-t/parallel-tests-many.sh \
-t/pr8365-remake-timing.sh \
-t/remake-am-pr10111.sh \
-t/remake-m4-pr10111.sh \
-t/txinfo5.sh \
-$(perl_fake_XFAIL_TESTS)
-
-perl_TESTS = \
-t/pm/Cond2.pl \
-t/pm/Cond3.pl \
-t/pm/Condition.pl \
-t/pm/Condition-t.pl \
-t/pm/DisjCon2.pl \
-t/pm/DisjCon3.pl \
-t/pm/DisjConditions.pl \
-t/pm/DisjConditions-t.pl \
-t/pm/Version.pl \
-t/pm/Version2.pl \
-t/pm/Version3.pl \
-t/pm/Wrap.pl
-
-# The order here is mostly alphabetical, with the deliberate exception
-# that tests having a high runtime (especially TAP tests that run various
-# checks sequentially) are listed early; this improves performance on
-# concurrent testsuite runs.
-handwritten_TESTS = \
-t/get-sysconf.sh \
-$(perl_TESTS) \
-t/instspc.tap \
-t/aclocal.sh \
-t/aclocal3.sh \
-t/aclocal4.sh \
-t/aclocal5.sh \
-t/aclocal6.sh \
-t/aclocal7.sh \
-t/aclocal8.sh \
-t/aclocal9.sh \
-t/acloca10.sh \
-t/acloca11.sh \
-t/acloca12.sh \
-t/acloca13.sh \
-t/acloca14.sh \
-t/acloca15.sh \
-t/acloca16.sh \
-t/acloca17.sh \
-t/acloca18.sh \
-t/acloca19.sh \
-t/acloca20.sh \
-t/acloca21.sh \
-t/acloca22.sh \
-t/acloca23.sh \
-t/aclocal-acdir.sh \
-t/aclocal-install-absdir.sh \
-t/aclocal-print-acdir.sh \
-t/aclocal-path.sh \
-t/aclocal-path-install.sh \
-t/aclocal-path-install-serial.sh \
-t/aclocal-path-nonexistent.sh \
-t/aclocal-path-precedence.sh \
-t/aclocal-install-fail.sh \
-t/aclocal-install-mkdir.sh \
-t/aclocal-no-install-no-mkdir.sh \
-t/aclocal-verbose-install.sh \
-t/ac-output-old.tap \
-t/acsilent.sh \
-t/acsubst.sh \
-t/acsubst2.sh \
-t/add-missing.tap \
-t/all.sh \
-t/all2.sh \
-t/alloca.sh \
-t/alloca2.sh \
-t/alpha.sh \
-t/alpha2.sh \
-t/amhello-cflags.sh \
-t/amhello-cross-compile.sh \
-t/amhello-binpkg.sh \
-t/amassign.sh \
-t/ammissing.sh \
-t/amopt.sh \
-t/amopts-location.sh \
-t/amopts-variable-expansion.sh \
-t/amsubst.sh \
-t/ansi2knr-no-more.sh \
-t/ar-lib.sh \
-t/ar-lib2.sh \
-t/ar-lib3.sh \
-t/ar-lib4.sh \
-t/ar-lib5a.sh \
-t/ar-lib5b.sh \
-t/ar-lib6a.sh \
-t/ar-lib6b.sh \
-t/ar-lib7.sh \
-t/ar.sh \
-t/ar2.sh \
-t/ar3.sh \
-t/ar4.sh \
-t/ar5.sh \
-t/asm.sh \
-t/asm2.sh \
-t/asm3.sh \
-t/autodist.sh \
-t/autodist-subdir.sh \
-t/autodist-acconfig.sh \
-t/autodist-acconfig-no-subdir.sh \
-t/autodist-aclocal-m4.sh \
-t/autodist-config-headers.sh \
-t/autodist-configure-no-subdir.sh \
-t/autodist-no-duplicate.sh \
-t/autodist-stamp-vti.sh \
-t/autohdr.sh \
-t/autohdr2.sh \
-t/autohdr3.sh \
-t/autohdr4.sh \
-t/autohdrdry.sh \
-t/automake-cmdline.tap \
-t/auxdir.sh \
-t/auxdir6.sh \
-t/auxdir7.sh \
-t/auxdir8.sh \
-t/auxdir-autodetect.sh \
-t/auxdir-computed.tap \
-t/auxdir-misplaced.sh \
-t/auxdir-nonexistent.sh \
-t/auxdir-unportable.tap \
-t/backcompat.sh \
-t/backcompat2.sh \
-t/backcompat3.sh \
-t/backcompat4.sh \
-t/backcompat5.sh \
-t/backcompat6.sh \
-t/backsl.sh \
-t/backsl2.sh \
-t/backsl3.sh \
-t/backsl4.sh \
-t/badline.sh \
-t/badopt.sh \
-t/badprog.sh \
-t/block.sh \
-t/bsource.sh \
-t/candist.sh \
-t/canon.sh \
-t/canon2.sh \
-t/canon3.sh \
-t/canon4.sh \
-t/canon5.sh \
-t/canon6.sh \
-t/canon7.sh \
-t/canon8.sh \
-t/canon-name.sh \
-t/ccnoco.sh \
-t/ccnoco2.sh \
-t/ccnoco3.sh \
-t/check.sh \
-t/check2.sh \
-t/check3.sh \
-t/check4.sh \
-t/check5.sh \
-t/check6.sh \
-t/check7.sh \
-t/check8.sh \
-t/check10.sh \
-t/check11.sh \
-t/check12.sh \
-t/check-subst.sh \
-t/check-subst-prog.sh \
-t/check-exported-srcdir.sh \
-t/check-fd-redirect.sh \
-t/check-tests-in-builddir.sh \
-t/check-no-test-driver.sh \
-t/check-concurrency-bug9245.sh \
-t/checkall.sh \
-t/clean.sh \
-t/clean2.sh \
-t/colneq2.sh \
-t/colon.sh \
-t/colon2.sh \
-t/colon3.sh \
-t/colon4.sh \
-t/colon5.sh \
-t/colon6.sh \
-t/colon7.sh \
-t/color.sh \
-t/color2.sh \
-t/comment.sh \
-t/comment2.sh \
-t/comment3.sh \
-t/comment4.sh \
-t/comment5.sh \
-t/comment6.sh \
-t/comment7.sh \
-t/comment8.sh \
-t/comment9.sh \
-t/commen10.sh \
-t/commen11.sh \
-t/comments-in-var-def.sh \
-t/compile.sh \
-t/compile2.sh \
-t/compile3.sh \
-t/compile4.sh \
-t/compile5.sh \
-t/compile6.sh \
-t/compile_f90_c_cxx.sh \
-t/compile_f_c_cxx.sh \
-t/cond-basic.sh \
-t/cond.sh \
-t/cond2.sh \
-t/cond3.sh \
-t/cond4.sh \
-t/cond5.sh \
-t/cond6.sh \
-t/cond7.sh \
-t/cond8.sh \
-t/cond9.sh \
-t/cond10.sh \
-t/cond11.sh \
-t/cond13.sh \
-t/cond14.sh \
-t/cond15.sh \
-t/cond16.sh \
-t/cond17.sh \
-t/cond18.sh \
-t/cond19.sh \
-t/cond20.sh \
-t/cond21.sh \
-t/cond22.sh \
-t/cond23.sh \
-t/cond24.sh \
-t/cond25.sh \
-t/cond26.sh \
-t/cond27.sh \
-t/cond28.sh \
-t/cond29.sh \
-t/cond30.sh \
-t/cond31.sh \
-t/cond32.sh \
-t/cond33.sh \
-t/cond34.sh \
-t/cond35.sh \
-t/cond36.sh \
-t/cond37.sh \
-t/cond38.sh \
-t/cond39.sh \
-t/cond40.sh \
-t/cond41.sh \
-t/cond42.sh \
-t/cond43.sh \
-t/cond44.sh \
-t/cond45.sh \
-t/cond46.sh \
-t/condd.sh \
-t/condhook.sh \
-t/condhook2.sh \
-t/condinc.sh \
-t/condinc2.sh \
-t/condlib.sh \
-t/condman2.sh \
-t/condman3.sh \
-t/configure.sh \
-t/confdeps.sh \
-t/conff.sh \
-t/conff2.sh \
-t/conffile-leading-dot.sh \
-t/confh.sh \
-t/confh4.sh \
-t/confh5.sh \
-t/confh6.sh \
-t/confh7.sh \
-t/confh8.sh \
-t/confincl.sh \
-t/conflnk.sh \
-t/conflnk2.sh \
-t/conflnk3.sh \
-t/conflnk4.sh \
-t/confsub.sh \
-t/confvar.sh \
-t/confvar2.sh \
-t/copy.sh \
-t/cscope.tap \
-t/cscope2.sh \
-t/cscope3.sh \
-t/cxx.sh \
-t/cxx2.sh \
-t/cxxcpp.sh \
-t/cxxlibobj.sh \
-t/cxxlink.sh \
-t/cxxnoc.sh \
-t/cxxo.sh \
-t/cygnus-check-without-all.sh \
-t/cygnus-dependency-tracking.sh \
-t/cygnus-imply-foreign.sh \
-t/cygnus-no-dist.sh \
-t/cygnus-no-installinfo.sh \
-t/cygnus-requires-maintainer-mode.sh \
-t/cygwin32.sh \
-t/dash.sh \
-t/defun.sh \
-t/defun2.sh \
-t/dejagnu.sh \
-t/dejagnu2.sh \
-t/dejagnu3.sh \
-t/dejagnu4.sh \
-t/dejagnu5.sh \
-t/dejagnu6.sh \
-t/dejagnu7.sh \
-t/dejagnu-absolute-builddir.sh \
-t/dejagnu-relative-srcdir.sh \
-t/dejagnu-siteexp-extend.sh \
-t/dejagnu-siteexp-append.sh \
-t/dejagnu-siteexp-useredit.sh \
-t/deleted-am.sh \
-t/deleted-m4.sh \
-t/depacl2.sh \
-t/depcomp.sh \
-t/depcomp2.sh \
-t/depcomp8a.sh \
-t/depcomp8b.sh \
-t/depcomp-recover.sh \
-t/depcomp-shuffle-sub-vpath.sh \
-t/depcomp-shuffle-sub.sh \
-t/depcomp-shuffle-vpath.sh \
-t/depcomp-shuffle.sh \
-t/depdist.sh \
-t/depend.sh \
-t/depend3.sh \
-t/depend4.sh \
-t/deprecated-acinit.sh \
-t/destdir.sh \
-t/dirlist.sh \
-t/dirlist2.sh \
-t/dirlist-abspath.sh \
-t/discover.sh \
-t/dist-formats.tap \
-t/dist-auxdir-many-subdirs.sh \
-t/dist-auxfile-2.sh \
-t/dist-auxfile.sh \
-t/dist-included-parent-dir.sh \
-t/dist-missing-am.sh \
-t/dist-missing-included-m4.sh \
-t/dist-missing-m4.sh \
-t/dist-readonly.sh \
-t/dist-repeated.sh \
-t/dist-pr109765.sh \
-t/distcleancheck.sh \
-t/distcom2.sh \
-t/distcom3.sh \
-t/distcom4.sh \
-t/distcom5.sh \
-t/distcom-subdir.sh \
-t/distdir.sh \
-t/disthook.sh \
-t/distlinks.sh \
-t/distlinksbrk.sh \
-t/distname.sh \
-t/distcheck-configure-flags.sh \
-t/distcheck-configure-flags-am.sh \
-t/distcheck-configure-flags-subpkg.sh \
-t/distcheck-hook.sh \
-t/distcheck-hook2.sh \
-t/distcheck-writable-srcdir.sh \
-t/distcheck-missing-m4.sh \
-t/distcheck-outdated-m4.sh \
-t/distcheck-override-infodir.sh \
-t/distcheck-pr9579.sh \
-t/distcheck-pr10470.sh \
-t/dmalloc.sh \
-t/doc-parsing-buglets-tabs.sh \
-t/dollar.sh \
-t/double.sh \
-t/dup2.sh \
-t/else.sh \
-t/empty.sh \
-t/empty2.sh \
-t/empty3.sh \
-t/empty4.sh \
-t/exdir.sh \
-t/exdir2.sh \
-t/exdir3.sh \
-t/exeext.sh \
-t/exeext2.sh \
-t/exeext3.sh \
-t/exeext4.sh \
-t/exsource.sh \
-t/ext.sh \
-t/ext2.sh \
-t/ext3.sh \
-t/extra.sh \
-t/extra2.sh \
-t/extra3.sh \
-t/extra4.sh \
-t/extra5.sh \
-t/extra6.sh \
-t/extra7.sh \
-t/extra8.sh \
-t/extra9.sh \
-t/extra10.sh \
-t/extra11.sh \
-t/extra12.sh \
-t/extra-programs-empty.sh \
-t/extra-portability.sh \
-t/extra-portability2.sh \
-t/extradep.sh \
-t/extradep2.sh \
-t/f90only.sh \
-t/flavor.sh \
-t/flibs.sh \
-t/fn99.sh \
-t/fn99subdir.sh \
-t/fnoc.sh \
-t/fo.sh \
-t/forcemiss.sh \
-t/forcemiss2.sh \
-t/fort1.sh \
-t/fort2.sh \
-t/fort4.sh \
-t/fort5.sh \
-t/fonly.sh \
-t/fortdep.sh \
-t/gcj.sh \
-t/gcj2.sh \
-t/gcj3.sh \
-t/gcj4.sh \
-t/gcj5.sh \
-t/gcj6.sh \
-t/gettext.sh \
-t/gettext2.sh \
-t/gettext3.sh \
-t/gmake-vars.sh \
-t/gnumake.sh \
-t/gnuwarn.sh \
-t/gnuwarn2.sh \
-t/gnits.sh \
-t/gnits2.sh \
-t/gnits3.sh \
-t/hdr-vars-defined-once.sh \
-t/header.sh \
-t/help.sh \
-t/help2.sh \
-t/help3.sh \
-t/help4.sh \
-t/help-depend.sh \
-t/help-depend2.sh \
-t/help-dmalloc.sh \
-t/help-init.sh \
-t/help-lispdir.sh \
-t/help-multilib.sh \
-t/help-python.sh \
-t/help-silent.sh \
-t/help-upc.sh \
-t/hfs.sh \
-t/implicit.sh \
-t/info.sh \
-t/init.sh \
-t/init2.sh \
-t/insh2.sh \
-t/install2.sh \
-t/installdir.sh \
-t/instsh.sh \
-t/instsh2.sh \
-t/instsh3.sh \
-t/instdat.sh \
-t/instdat2.sh \
-t/instdir.sh \
-t/instdir2.sh \
-t/instdir-cond.sh \
-t/instdir-cond2.sh \
-t/instdir-no-empty.sh \
-t/instdir-java.sh \
-t/instdir-lisp.sh \
-t/instdir-ltlib.sh \
-t/instdir-prog.sh \
-t/instdir-python.sh \
-t/instdir-texi.sh \
-t/instexec.sh \
-t/instfail.sh \
-t/instfail-info.sh \
-t/instfail-java.sh \
-t/instfail-libtool.sh \
-t/insthook.sh \
-t/instman.sh \
-t/instman2.sh \
-t/instmany.sh \
-t/instmany-mans.sh \
-t/instmany-python.sh \
-t/install-info-dir.sh \
-t/interp.sh \
-t/interp2.sh \
-t/interp3.sh \
-t/java.sh \
-t/java2.sh \
-t/java3.sh \
-t/javadir-undefined.sh \
-t/javaflags.sh \
-t/java-check.sh \
-t/java-clean.sh \
-t/java-compile-install.sh \
-t/java-compile-run-flat.sh \
-t/java-compile-run-nested.sh \
-t/java-empty-classpath.sh \
-t/javaprim.sh \
-t/javasubst.sh \
-t/java-extra.sh \
-t/java-mix.sh \
-t/java-no-duplicate.sh \
-t/java-nobase.sh \
-t/java-noinst.sh \
-t/java-rebuild.sh \
-t/java-sources.sh \
-t/java-uninstall.sh \
-t/ldadd.sh \
-t/ldflags.sh \
-t/lex.sh \
-t/lex2.sh \
-t/lex3.sh \
-t/lex5.sh \
-t/lexcpp.sh \
-t/lexvpath.sh \
-t/lex-subobj-nodep.sh \
-t/lex-lib.sh \
-t/lex-lib-external.sh \
-t/lex-libobj.sh \
-t/lex-noyywrap.sh \
-t/lex-clean-cxx.sh \
-t/lex-clean.sh \
-t/lex-depend-cxx.sh \
-t/lex-depend-grep.sh \
-t/lex-depend.sh \
-t/lex-line.sh \
-t/lex-nodist.sh \
-t/lex-pr204.sh \
-t/lflags.sh \
-t/lflags2.sh \
-t/libexec.sh \
-t/libobj-basic.sh \
-t/libobj2.sh \
-t/libobj3.sh \
-t/libobj4.sh \
-t/libobj5.sh \
-t/libobj7.sh \
-t/libobj10.sh \
-t/libobj12.sh \
-t/libobj13.sh \
-t/libobj14.sh \
-t/libobj15a.sh \
-t/libobj15b.sh \
-t/libobj15c.sh \
-t/libobj16a.sh \
-t/libobj16b.sh \
-t/libobj17.sh \
-t/libobj18.sh \
-t/libobj19.sh \
-t/libobj20a.sh \
-t/libobj20b.sh \
-t/libobj20c.sh \
-t/library.sh \
-t/library2.sh \
-t/library3.sh \
-t/libtool.sh \
-t/libtool2.sh \
-t/libtool3.sh \
-t/libtool4.sh \
-t/libtool5.sh \
-t/libtool6.sh \
-t/libtool7.sh \
-t/libtool8.sh \
-t/libtool9.sh \
-t/libtoo10.sh \
-t/libtoo11.sh \
-t/license.sh \
-t/license2.sh \
-t/link_c_cxx.sh \
-t/link_cond.sh \
-t/link_dist.sh \
-t/link_f90_only.sh \
-t/link_fc.sh \
-t/link_fccxx.sh \
-t/link_fcxx.sh \
-t/link_f_only.sh \
-t/link_override.sh \
-t/lisp2.sh \
-t/lisp3.sh \
-t/lisp4.sh \
-t/lisp5.sh \
-t/lisp6.sh \
-t/lisp7.sh \
-t/lisp8.sh \
-t/lispdry.sh \
-t/listval.sh \
-t/location.sh \
-t/longline.sh \
-t/longlin2.sh \
-t/ltcond.sh \
-t/ltcond2.sh \
-t/ltconv.sh \
-t/ltdeps.sh \
-t/ltinit.sh \
-t/ltinstloc.sh \
-t/ltlibobjs.sh \
-t/ltlibsrc.sh \
-t/ltorder.sh \
-t/lzma.sh \
-t/m4-inclusion.sh \
-t/maintclean.sh \
-t/maintclean-vpath.sh \
-t/maintmode-configure-msg.sh \
-t/makefile-deps.sh \
-t/makej.sh \
-t/makej2.sh \
-t/maken.sh \
-t/maken3.sh \
-t/make-dryrun.tap \
-t/makevars.sh \
-t/man.sh \
-t/man2.sh \
-t/man3.sh \
-t/man4.sh \
-t/man5.sh \
-t/man6.sh \
-t/man7.sh \
-t/man8.sh \
-t/mdate.sh \
-t/mdate2.sh \
-t/mdate3.sh \
-t/mdate4.sh \
-t/mdate5.sh \
-t/mdate6.sh \
-t/missing.sh \
-t/missing2.sh \
-t/missing3.sh \
-t/missing4.sh \
-t/missing5.sh \
-t/missing6.sh \
-t/missing-auxfile-stops-makefiles-creation.sh \
-t/mkinstall.sh \
-t/mkinst2.sh \
-t/mkinst3.sh \
-t/mmode.sh \
-t/mmodely.sh \
-t/multlib.sh \
-t/no-extra-makefile-code.sh \
-t/no-outdir-option.sh \
-t/nobase.sh \
-t/nobase-libtool.sh \
-t/nobase-python.sh \
-t/nobase-nodist.sh \
-t/nodef.sh \
-t/nodef2.sh \
-t/nodep.sh \
-t/nodep2.sh \
-t/nodepcomp.sh \
-t/nodist.sh \
-t/nodist2.sh \
-t/nodist3.sh \
-t/noinst.sh \
-t/noinstdir.sh \
-t/nolink.sh \
-t/nostdinc.sh \
-t/notrans.sh \
-t/number.sh \
-t/objc.sh \
-t/objc2.sh \
-t/objdir.sh \
-t/objext-pr10128.sh \
-t/obsolete.sh \
-t/oldvars.sh \
-t/option-ng.sh \
-t/order.sh \
-t/output.sh \
-t/output2.sh \
-t/output3.sh \
-t/output4.sh \
-t/output5.sh \
-t/output6.sh \
-t/output7.sh \
-t/output8.sh \
-t/output9.sh \
-t/output10.sh \
-t/output11.sh \
-t/output12.sh \
-t/output13.sh \
-t/output-order.sh \
-t/override-conditional-1.sh \
-t/override-conditional-2.sh \
-t/override-html.sh \
-t/override-suggest-local.sh \
-t/parallel-am.sh \
-t/parallel-am2.sh \
-t/parallel-am3.sh \
-t/serial-tests.sh \
-t/parallel-tests.sh \
-t/parallel-tests2.sh \
-t/parallel-tests3.sh \
-t/parallel-tests5.sh \
-t/parallel-tests6.sh \
-t/parallel-tests8.sh \
-t/parallel-tests9.sh \
-t/parallel-tests10.sh \
-t/parallel-tests-recheck-depends-on-all.sh \
-t/parallel-tests-exeext.sh \
-t/parallel-tests-suffix.sh \
-t/parallel-tests-suffix-prog.sh \
-t/parallel-tests-log-compiler-1.sh \
-t/parallel-tests-log-compiler-2.sh \
-t/parallel-tests-dry-run-1.sh \
-t/parallel-tests-dry-run-2.sh \
-t/parallel-tests-fd-redirect.sh \
-t/parallel-tests-fd-redirect-exeext.sh \
-t/parallel-tests-extra-programs.sh \
-t/parallel-tests-unreadable.sh \
-t/parallel-tests-subdir.sh \
-t/parallel-tests-interrupt.tap \
-t/parallel-tests-reset-term.sh \
-t/parallel-tests-harderror.sh \
-t/parallel-tests-log-override-1.sh \
-t/parallel-tests-log-override-2.sh \
-t/parallel-tests-log-override-recheck.sh \
-t/parallel-tests-log-compiler-example.sh \
-t/parallel-tests-cmdline-override.sh \
-t/parallel-tests-fork-bomb.sh \
-t/parallel-tests-empty-testlogs.sh \
-t/parallel-tests-driver-install.sh \
-t/parallel-tests-no-color-in-log.sh \
-t/parallel-tests-no-spurious-summary.sh \
-t/parallel-tests-exit-statuses.sh \
-t/parallel-tests-console-output.sh \
-t/parallel-tests-once.sh \
-t/parallel-tests-trailing-bslash.sh \
-t/parallel-tests-many.sh \
-t/tests-environment.sh \
-t/am-tests-environment.sh \
-t/tests-environment-backcompat.sh \
-t/testsuite-summary-color.sh \
-t/testsuite-summary-count.sh \
-t/testsuite-summary-count-many.sh \
-t/testsuite-summary-reference-log.sh \
-t/test-driver-acsubst.sh \
-t/test-driver-cond.sh \
-t/test-driver-custom-no-extra-driver.sh \
-t/test-driver-custom.sh \
-t/test-driver-custom-xfail-tests.sh \
-t/test-driver-custom-multitest.sh \
-t/test-driver-custom-multitest-recheck.sh \
-t/test-driver-custom-multitest-recheck2.sh \
-t/test-driver-create-log-dir.sh \
-t/test-driver-strip-vpath.sh \
-t/test-driver-trs-suffix-registered.sh \
-t/test-driver-fail.sh \
-t/test-driver-is-distributed.sh \
-t/test-harness-vpath-rewrite.sh \
-t/test-log.sh \
-t/test-logs-repeated.sh \
-t/test-metadata-global-log.sh \
-t/test-metadata-global-result.sh \
-t/test-metadata-recheck.sh \
-t/test-metadata-results.sh \
-t/test-missing.sh \
-t/test-missing2.sh \
-t/test-trs-basic.sh \
-t/test-trs-recover.sh \
-t/test-trs-recover2.sh \
-t/test-extensions.sh \
-t/test-extensions-cond.sh \
-t/parse.sh \
-t/pattern-rules.sh \
-t/pattern-rules2.sh \
-t/phony.sh \
-t/pluseq.sh \
-t/pluseq2.sh \
-t/pluseq3.sh \
-t/pluseq4.sh \
-t/pluseq5.sh \
-t/pluseq6.sh \
-t/pluseq7.sh \
-t/pluseq8.sh \
-t/pluseq9.sh \
-t/pluseq10.sh \
-t/pluseq11.sh \
-t/posixsubst-data.sh \
-t/posixsubst-extradist.sh \
-t/posixsubst-ldadd.sh \
-t/posixsubst-libraries.sh \
-t/posixsubst-ltlibraries.sh \
-t/posixsubst-programs.sh \
-t/posixsubst-scripts.sh \
-t/posixsubst-sources.sh \
-t/posixsubst-tests.sh \
-t/ppf77.sh \
-t/pr2.sh \
-t/pr9.sh \
-t/pr72.sh \
-t/pr87.sh \
-t/pr211.sh \
-t/pr220.sh \
-t/pr224.sh \
-t/pr229.sh \
-t/pr279.sh \
-t/pr279-2.sh \
-t/pr287.sh \
-t/pr300-lib.sh \
-t/pr300-ltlib.sh \
-t/pr300-prog.sh \
-t/pr307.sh \
-t/pr401.sh \
-t/pr401b.sh \
-t/pr401c.sh \
-t/prefix.sh \
-t/primary.sh \
-t/primary2.sh \
-t/primary3.sh \
-t/primary-prefix-invalid-couples.tap \
-t/primary-prefix-valid-couples.sh \
-t/primary-prefix-couples-force-valid.sh \
-t/primary-prefix-couples-documented-valid.sh \
-t/print-libdir.sh \
-t/proginst.sh \
-t/programs-primary-rewritten.sh \
-t/py-compile-basic.sh \
-t/py-compile-basic2.sh \
-t/py-compile-basedir.sh \
-t/py-compile-destdir.sh \
-t/py-compile-env.sh \
-t/py-compile-option-terminate.sh \
-t/py-compile-usage.sh \
-t/python.sh \
-t/python2.sh \
-t/python3.sh \
-t/python4.sh \
-t/python5.sh \
-t/python5b.sh \
-t/python6.sh \
-t/python7.sh \
-t/python8.sh \
-t/python9.sh \
-t/python10.sh \
-t/python11.sh \
-t/python12.sh \
-t/python-dist.sh \
-t/python-vars.sh \
-t/python-virtualenv.sh \
-t/python-pr10995.sh \
-t/recurs.sh \
-t/recurs2.sh \
-t/relativize.tap \
-t/remake.sh \
-t/remake1a.sh \
-t/remake2.sh \
-t/remake3.sh \
-t/remake3a.sh \
-t/remake4.sh \
-t/remake5.sh \
-t/remake6.sh \
-t/remake7.sh \
-t/remake8a.sh \
-t/remake8b.sh \
-t/remake9a.sh \
-t/remake9b.sh \
-t/remake9c.sh \
-t/remake9d.sh \
-t/remake10a.sh \
-t/remake10b.sh \
-t/remake10c.sh \
-t/remake11.sh \
-t/remake12.sh \
-t/remake-all-1.sh \
-t/remake-subdir-from-subdir.sh \
-t/remake-subdir-gnu.sh \
-t/remake-subdir.sh \
-t/remake-subdir-long-time.sh \
-t/remake-gnulib-add-acsubst.sh \
-t/remake-gnulib-add-header.sh \
-t/remake-gnulib-remove-header.sh \
-t/remake-moved-m4-file.sh \
-t/remake-deleted-m4-file.sh \
-t/remake-renamed-m4-file.sh \
-t/remake-renamed-m4-macro-and-file.sh \
-t/remake-renamed-m4-macro.sh \
-t/remake-am-pr10111.sh \
-t/remake-m4-pr10111.sh \
-t/remake-deleted-am-2.sh \
-t/remake-deleted-am-subdir.sh \
-t/remake-deleted-am.sh \
-t/remake-renamed-am.sh \
-t/pr8365-remake-timing.sh \
-t/req.sh \
-t/reqd.sh \
-t/reqd2.sh \
-t/repeated-options.sh \
-t/rst-formatting.sh \
-t/rulepat.sh \
-t/self-check-cleanup.tap \
-t/self-check-configure-help.sh \
-t/self-check-dir.tap \
-t/self-check-env-sanitize.tap \
-t/self-check-exit.tap \
-t/self-check-explicit-skips.sh \
-t/self-check-is_newest.tap \
-t/self-check-me.tap \
-t/self-check-reexec.tap \
-t/self-check-report.sh \
-t/self-check-sanity.sh \
-t/self-check-seq.tap \
-t/self-check-is-blocked-signal.tap \
-t/self-check-tap.sh \
-t/self-check-unindent.tap \
-t/sanity.sh \
-t/scripts.sh \
-t/seenc.sh \
-t/silent.sh \
-t/silent2.sh \
-t/silent3.sh \
-t/silent4.sh \
-t/silent6.sh \
-t/silent7.sh \
-t/silent8.sh \
-t/silent9.sh \
-t/silentcxx.sh \
-t/silentcxx-gcc.sh \
-t/silentf77.sh \
-t/silentf90.sh \
-t/silent-many-gcc.sh \
-t/silent-many-generic.sh \
-t/silent-configsite.sh \
-t/silent-lex.sh \
-t/silent-yacc.sh \
-t/silent-yacc-headers.sh \
-t/srcsub.sh \
-t/srcsub2.sh \
-t/space.sh \
-t/specflg.sh \
-t/specflg2.sh \
-t/specflg3.sh \
-t/specflg6.sh \
-t/specflg7.sh \
-t/specflg8.sh \
-t/specflg9.sh \
-t/specflg10.sh \
-t/specflg-dummy.sh \
-t/spell.sh \
-t/spell2.sh \
-t/spell3.sh \
-t/spelling.sh \
-t/spy-autovars.sh \
-t/spy-double-colon.sh \
-t/spy-phony.sh \
-t/spy-rm.tap \
-t/spy-vpath-rewrite.sh \
-t/stdinc.sh \
-t/stamph2.sh \
-t/stdlib.sh \
-t/stdlib2.sh \
-t/strictness-override.sh \
-t/strictness-precedence.sh \
-t/strip.sh \
-t/strip2.sh \
-t/strip3.sh \
-t/subdir.sh \
-t/subdir2.sh \
-t/subdir3.sh \
-t/subdir4.sh \
-t/subdir5.sh \
-t/subdir6.sh \
-t/subdir8.sh \
-t/subdir9.sh \
-t/subdir10.sh \
-t/subdirbuiltsources.sh \
-t/subcond.sh \
-t/subcond2.sh \
-t/subcond3.sh \
-t/subobj.sh \
-t/subobj2.sh \
-t/subobj4.sh \
-t/subobj5.sh \
-t/subobj6.sh \
-t/subobj7.sh \
-t/subobj8.sh \
-t/subobj9.sh \
-t/subobj10.sh \
-t/subobj11a.sh \
-t/subobj11c.sh \
-t/subobjname.sh \
-t/subpkg.sh \
-t/subpkg2.sh \
-t/subpkg3.sh \
-t/subpkg4.sh \
-t/subpkg-yacc.sh \
-t/subst.sh \
-t/subst3.sh \
-t/subst4.sh \
-t/subst5.sh \
-t/subst-no-trailing-empty-line.sh \
-t/substref.sh \
-t/substre2.sh \
-t/substtarg.sh \
-t/suffix.sh \
-t/suffix2.sh \
-t/suffix3.tap \
-t/suffix4.sh \
-t/suffix5.sh \
-t/suffix6.sh \
-t/suffix6b.sh \
-t/suffix6c.sh \
-t/suffix7.sh \
-t/suffix8.tap \
-t/suffix9.sh \
-t/suffix10.tap \
-t/suffix11.tap \
-t/suffix12.sh \
-t/suffix13.sh \
-t/suffix-chain.tap \
-t/symlink.sh \
-t/symlink2.sh \
-t/syntax.sh \
-t/tap-ambiguous-directive.sh \
-t/tap-autonumber.sh \
-t/tap-bailout.sh \
-t/tap-bailout-leading-space.sh \
-t/tap-bailout-and-logging.sh \
-t/tap-bailout-suppress-badexit.sh \
-t/tap-bailout-suppress-later-diagnostic.sh \
-t/tap-bailout-suppress-later-errors.sh \
-t/tap-color.sh \
-t/tap-deps.sh \
-t/tap-diagnostic.sh \
-t/tap-empty-diagnostic.sh \
-t/tap-empty.sh \
-t/tap-escape-directive.sh \
-t/tap-escape-directive-2.sh \
-t/tap-exit.sh \
-t/tap-signal.tap \
-t/tap-fancy.sh \
-t/tap-fancy2.sh \
-t/tap-global-log.sh \
-t/tap-global-result.sh \
-t/tap-log.sh \
-t/tap-msg0-result.sh \
-t/tap-msg0-directive.sh \
-t/tap-msg0-planskip.sh \
-t/tap-msg0-bailout.sh \
-t/tap-msg0-misc.sh \
-t/tap-merge-stdout-stderr.sh \
-t/tap-no-merge-stdout-stderr.sh \
-t/tap-no-disable-hard-error.sh \
-t/tap-no-spurious-summary.sh \
-t/tap-no-spurious-numbers.sh \
-t/tap-no-spurious.sh \
-t/tap-not-ok-skip.sh \
-t/tap-number-wordboundary.sh \
-t/tap-numeric-description.sh \
-t/tap-negative-numbers.sh \
-t/tap-numbers-leading-zero.sh \
-t/tap-out-of-order.sh \
-t/tap-passthrough.sh \
-t/tap-passthrough-exit.sh \
-t/tap-plan.sh \
-t/tap-plan-corner.sh \
-t/tap-plan-errors.sh \
-t/tap-plan-middle.sh \
-t/tap-plan-whitespace.sh \
-t/tap-plan-leading-zero.sh \
-t/tap-plan-malformed.sh \
-t/tap-missing-plan-and-bad-exit.sh \
-t/tap-planskip.sh \
-t/tap-planskip-late.sh \
-t/tap-planskip-and-logging.sh \
-t/tap-planskip-unplanned.sh \
-t/tap-planskip-unplanned-corner.sh \
-t/tap-planskip-case-insensitive.sh \
-t/tap-planskip-whitespace.sh \
-t/tap-planskip-badexit.sh \
-t/tap-planskip-bailout.sh \
-t/tap-planskip-later-errors.sh \
-t/tap-realtime.sh \
-t/tap-test-number-0.sh \
-t/tap-recheck-logs.sh \
-t/tap-result-comment.sh \
-t/tap-todo-skip-together.sh \
-t/tap-todo-skip-whitespace.sh \
-t/tap-todo-skip.sh \
-t/tap-unplanned.sh \
-t/tap-whitespace-normalization.sh \
-t/tap-with-and-without-number.sh \
-t/tap-xfail-tests.sh \
-t/tap-common-setup.sh \
-t/tap-bad-prog.tap \
-t/tap-basic.sh \
-t/tap-diagnostic-custom.sh \
-t/tap-driver-stderr.sh \
-t/tap-doc.sh \
-t/tap-doc2.sh \
-t/tap-more.sh \
-t/tap-more2.sh \
-t/tap-recheck.sh \
-t/tap-summary.sh \
-t/tap-summary-color.sh \
-t/tags.sh \
-t/tags2.sh \
-t/tagsub.sh \
-t/tar.sh \
-t/tar2.sh \
-t/tar3.sh \
-t/tar-override.sh \
-t/target-cflags.sh \
-t/targetclash.sh \
-t/tests-environment-fd-redirect.sh \
-t/tests-environment-and-log-compiler.sh \
-t/txinfo.sh \
-t/txinfo2.sh \
-t/txinfo3.sh \
-t/txinfo4.sh \
-t/txinfo5.sh \
-t/txinfo5b.sh \
-t/txinfo6.sh \
-t/txinfo7.sh \
-t/txinfo8.sh \
-t/txinfo9.sh \
-t/txinfo10.sh \
-t/txinfo13.sh \
-t/txinfo16.sh \
-t/txinfo17.sh \
-t/txinfo19.sh \
-t/txinfo20.sh \
-t/txinfo21.sh \
-t/txinfo22.sh \
-t/txinfo23.sh \
-t/txinfo24.sh \
-t/txinfo25.sh \
-t/txinfo26.sh \
-t/txinfo27.sh \
-t/txinfo28.sh \
-t/txinfo29.sh \
-t/txinfo30.sh \
-t/txinfo31.sh \
-t/txinfo32.sh \
-t/txinfo33.sh \
-t/txinfo-no-clutter.sh \
-t/txinfo-unrecognized-extension.sh \
-t/transform.sh \
-t/transform2.sh \
-t/transform3.sh \
-t/uninstall-fail.sh \
-t/uninstall-pr9578.sh \
-t/unused.sh \
-t/upc.sh \
-t/upc2.sh \
-t/upc3.sh \
-t/vala.sh \
-t/vala2.sh \
-t/vala3.sh \
-t/vala4.sh \
-t/vala5.sh \
-t/vala-vapi.sh \
-t/vala-headers.sh \
-t/vala-libs.sh \
-t/vala-vpath.sh \
-t/vala-mix.sh \
-t/vala-mix2.sh \
-t/vala-parallel.sh \
-t/vars.sh \
-t/vars-assign.sh \
-t/vartar.sh \
-t/vartypos.sh \
-t/vartypo2.sh \
-t/version.sh \
-t/version2.sh \
-t/version3.sh \
-t/version4.sh \
-t/version6.sh \
-t/version7.sh \
-t/version8.sh \
-t/vpath-rewrite.sh \
-t/vpath.sh \
-t/vtexi.sh \
-t/vtexi2.sh \
-t/vtexi3.sh \
-t/vtexi4.sh \
-t/warnings-override.sh \
-t/warnings-precedence.sh \
-t/warnings-strictness-interactions.sh \
-t/warnings-unknown.sh \
-t/warnopts.sh \
-t/warnings-win-over-strictness.sh \
-t/warning-groups-win-over-strictness.sh \
-t/werror.sh \
-t/werror2.sh \
-t/werror3.sh \
-t/werror4.sh \
-t/whoami.sh \
-t/xsource.sh \
-t/yacc.sh \
-t/yacc2.sh \
-t/yacc4.sh \
-t/yacc5.sh \
-t/yacc7.sh \
-t/yacc8.sh \
-t/yaccdry.sh \
-t/yaccpp.sh \
-t/yaccvpath.sh \
-t/yacc-auxdir.sh \
-t/yacc-basic.sh \
-t/yacc-cxx.sh \
-t/yacc-bison-skeleton-cxx.sh \
-t/yacc-bison-skeleton.sh \
-t/yacc-clean.sh \
-t/yacc-clean-cxx.sh \
-t/yacc-d-basic.sh \
-t/yacc-d-cxx.sh \
-t/yacc-d-vpath.sh \
-t/yacc-deleted-headers.sh \
-t/yacc-depend.sh \
-t/yacc-depend2.sh \
-t/yacc-dist-nobuild-subdir.sh \
-t/yacc-dist-nobuild.sh \
-t/yacc-line.sh \
-t/yacc-mix-c-cxx.sh \
-t/yacc-nodist.sh \
-t/yacc-pr204.sh \
-t/yacc-subobj-nodep.sh \
-t/yacc-weirdnames.sh \
-t/yflags.sh \
-t/yflags2.sh \
-t/yflags-cmdline-override.sh \
-t/yflags-conditional.sh \
-t/yflags-d-false-positives.sh \
-t/yflags-force-conditional.sh \
-t/yflags-force-override.sh \
-t/yflags-var-expand.sh \
-t/libtool-macros.sh \
-t/gettext-macros.sh
-
-print-list-of-tests:
-       @echo $(handwritten_TESTS)
-.PHONY: print-list-of-tests
diff --git a/t/parallel-tests-dynamic.sh b/t/parallel-tests-dynamic.sh
new file mode 100755
index 0000000..3b4fcb9
--- /dev/null
+++ b/t/parallel-tests-dynamic.sh
@@ -0,0 +1,145 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that dynamic content for $(TESTS) and $(TEST_LOGS) is
+# supported.
+
+am_parallel_tests=yes
+. ./defs || Exit 1
+
+echo AC_OUTPUT >> configure.ac
+
+cat > ok <<'END'
+#!/bin/sh
+exit 0
+END
+
+cat > ko <<'END'
+#!/bin/sh
+exit 1
+END
+
+cat > er << 'END'
+#!/bin/sh
+echo $0 should not be run >&2
+exit 99
+END
+
+chmod a+x ko ok
+
+mkdir t
+cp ok t/nosuffix
+
+cp ok g1.sh
+cp ok g2.sh
+cp ok g3.sh
+cp ok g4.sh
+cp er g5.sh
+
+cp ok t00-foo.sh
+cp ok t02.sh
+cp ok t57_mu.sh
+cp ok t7311.sh
+cp ko t98S.sh
+cp ko t99.sh
+cp er t1.sh
+cp er t9.sh
+cp er tx98.sh
+
+cat > get-tests-list <<END
+#!/bin/sh
+echo "g1.sh  ${tab}g2.sh "
+if :; then echo '  g3.sh'; fi
+echo
+echo g4.sh
+END
+chmod a+x get-tests-list
+
+cat > Makefile.am << 'END'
+my_add_dirprefix = $(strip $(1))/$(strip $(2))
+EXTRA_DIST = $(TESTS) get-tests-list
+TEST_EXTENSIONS = .sh
+TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
+TESTS += $(shell $(srcdir)/get-tests-list)
+TESTS += $(call my_add_dirprefix, t, nosuffix)
+XFAIL_TESTS = $(wildcard $(srcdir)/t9[0-9]*.sh)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check > stdout || { cat stdout; Exit 1; }
+cat stdout
+
+count_test_results total=11 pass=9 fail=0 xpass=0 xfail=2 skip=0 error=0
+
+grep '^PASS: t/nosuffix$' stdout
+grep '^PASS: g1\.sh$'     stdout
+grep '^PASS: g2\.sh$'     stdout
+grep '^PASS: g3\.sh$'     stdout
+grep '^PASS: g4\.sh$'     stdout
+grep '^PASS: t00-foo\.sh' stdout
+grep '^PASS: t02\.sh'     stdout
+grep '^PASS: t57_mu\.sh'  stdout
+grep '^PASS: t7311\.sh'   stdout
+grep '^XFAIL: t98S\.sh'   stdout
+grep '^XFAIL: t99\.sh'    stdout
+
+$MAKE mostlyclean
+test "`find . -name *.log`" = ./config.log
+
+$MAKE distcheck > stdout || { cat stdout; Exit 1; }
+cat stdout
+count_test_results total=11 pass=9 fail=0 xpass=0 xfail=2 skip=0 error=0
+
+$MAKE check tests1='$(wildcard t00*.sh t98?.sh)' \
+            tests2='$(shell ./get-tests-list | sed 1d)' \
+            TESTS='$(tests1) $(tests2)' \
+  > stdout || { cat stdout; Exit 1; }
+cat stdout
+
+count_test_results total=4 pass=3 fail=0 xpass=0 xfail=1 skip=0 error=0
+
+grep '^PASS: g3\.sh$'     stdout
+grep '^PASS: g4\.sh$'     stdout
+grep '^PASS: t00-foo\.sh' stdout
+grep '^XFAIL: t98S\.sh'   stdout
+
+$MAKE mostlyclean
+test "`find . -name *.log`" = ./config.log
+
+# We can also override $(TEST_LOGS) dynamically.
+$MAKE check TEST_LOGS='$(shell echo t00 | sed "s/$$/-foo.log/") t99.log'
+test -f t00-foo.log
+test -f t99.log
+
+# A little tricky in that we rely on the .log files created by
+# the previous run to be present.
+$MAKE check TEST_LOGS="\
+  \$(wildcard t[0-9]*.log) \
+  \$(call my_add_dirprefix, t, nosuffix).log \
+" > stdout || { cat stdout; Exit 1; }
+cat stdout
+
+count_test_results total=3 pass=2 fail=0 xpass=0 xfail=1 skip=0 error=0
+grep '^PASS: t00-foo\.sh' stdout
+grep '^PASS: t/nosuffix'  stdout
+grep '^XFAIL: t99\.sh'    stdout
+
+:
diff --git a/t/parallel-tests-exeext.sh b/t/parallel-tests-exeext.sh
index e93f5f1..ac94533 100755
--- a/t/parallel-tests-exeext.sh
+++ b/t/parallel-tests-exeext.sh
@@ -61,7 +61,4 @@ test ! -r y.bin.log
 test -f b.log
 test ! -r b.test.log
 
-$EGREP '^y\.log: y(\$\(EXEEXT\)|\.bin)' Makefile
-$EGREP '^\.test(\$\(EXEEXT\)|\.bin)\.log:' Makefile
-
 :
diff --git a/t/parallel-tests-fd-redirect-exeext.sh 
b/t/parallel-tests-fd-redirect-exeext.sh
index 56d7f59..7904b2d 100755
--- a/t/parallel-tests-fd-redirect-exeext.sh
+++ b/t/parallel-tests-fd-redirect-exeext.sh
@@ -98,13 +98,6 @@ else
   fatal_ "unexpected error in ./configure"
 fi
 
-# Sanity checks.
-st=0
-grep '^baz\.log:.*baz\$(EXEEXT)' Makefile || st=1
-grep '^\.test\$(EXEEXT)\.log:' Makefile || st=1
-grep '^qux\.log:' Makefile && st=1
-test $st -eq 0 || fatal_ "doesn't cover expected code paths"
-
 st=0
 $MAKE check >stdout || st=1
 cat stdout
diff --git a/t/parallel-tests-fd-redirect.sh b/t/parallel-tests-fd-redirect.sh
index cf7acce..ad5815d 100755
--- a/t/parallel-tests-fd-redirect.sh
+++ b/t/parallel-tests-fd-redirect.sh
@@ -52,12 +52,6 @@ chmod a+x foo.sh bar
 
 ./configure
 
-# Sanity checks.
-st=0
-grep '^bar\.log:.*bar' Makefile || st=1
-grep '^foo\.log:' Makefile && st=1
-test $st -eq 0 || fatal_ "doesn't cover expected code paths"
-
 st=0; $MAKE check >stdout || st=1
 cat stdout
 cat foo.log
diff --git a/t/parallel-tests-fork-bomb.sh b/t/parallel-tests-fork-bomb.sh
index 4daa811..193a6e7 100755
--- a/t/parallel-tests-fork-bomb.sh
+++ b/t/parallel-tests-fork-bomb.sh
@@ -61,9 +61,8 @@ do_check ()
   $MAKE "$@" check >output 2>&1 || st=$?
   cat output
   $FGREP '::OOPS::' output && Exit 1 # Possible infinite recursion.
-  # Check that at least we don't create a botched global log file.
-  test ! -f "$log"
   grep "[Cc]ircular.*dependency" output | $FGREP "$log"
+  grep "$log:.*depends on itself" output
   test $st -gt 0
 }
 
diff --git a/t/parallel-tests-longest-stem.sh b/t/parallel-tests-longest-stem.sh
new file mode 100755
index 0000000..242d78f
--- /dev/null
+++ b/t/parallel-tests-longest-stem.sh
@@ -0,0 +1,66 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# The parallel-tests driver must prefer tests with an extension to
+# extension-less tests.  This is required to allow the user to have
+# a, say, 'all.test' test case even in the face of the 'all' target.
+
+am_parallel_tests=yes
+. ./defs || Exit 1
+
+echo AC_OUTPUT >> configure.ac
+
+cat > foo <<'END'
+#!/bin/sh
+echo "foo without suffix run" >&2
+exit 99
+END
+
+cat > foo.test <<'END'
+#!/bin/sh
+echo "$0 has been run"
+END
+chmod a+x foo.test
+
+cp foo.test all.test
+cp foo.test dist.test
+cp foo.test install.test
+cp foo.test bad-target.test
+
+
+cat > Makefile.am << 'END'
+bad-target:
+       @echo $@ has been run >&2; exit 1
+install-data-local:
+       @echo $@ has been run >&2; exit 1
+TESTS = foo.test all.test install.test dist.test bad-target.test
+EXTRA_DIST = oops-this-does-not-exist
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure --prefix="`pwd`/inst"
+
+$MAKE check
+ls -l # For debugging.
+test ! -d inst
+for t in foo all install dist bad-target; do
+  grep "$t\.test has been run" $t.log
+done
+
+:
diff --git a/t/parallel-tests-once.sh b/t/parallel-tests-no-repeat.sh
similarity index 65%
copy from t/parallel-tests-once.sh
copy to t/parallel-tests-no-repeat.sh
index 53ee677..c3220c0 100755
--- a/t/parallel-tests-once.sh
+++ b/t/parallel-tests-no-repeat.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,25 +14,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Tests shouldn't be run multiple times by a simple "make check" in a
-# clean directory.  An early implementation of the '.trs' intermediate
-# files incurred a similar problem.
+# The parallel-tests harness do not cause the same test to be
+# uselessly run multiple times.
 
 am_parallel_tests=yes
 . ./defs || Exit 1
 
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-TESTS = foo.test
-END
+echo AC_OUTPUT >> configure.ac
+echo TESTS = foo.test > Makefile.am
 
 cat > foo.test <<'END'
 #! /bin/sh
-test -f foo.run && Exit 1
-: > foo.run
+ls -l && mkdir bar
 END
 chmod a+x foo.test
 
@@ -42,7 +35,10 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE check
-test -f foo.run # Sanity check.
+$MAKE -j1 check || { cat test-suite.log; Exit 1; }
+rmdir bar
+$MAKE -j2 check || { cat test-suite.log; Exit 1; }
+rmdir bar
+$MAKE -j4 check || { cat test-suite.log; Exit 1; }
 
 :
diff --git a/t/parallel-tests8.sh b/t/parallel-tests-srcdir-in-test-name.sh
similarity index 66%
copy from t/parallel-tests8.sh
copy to t/parallel-tests-srcdir-in-test-name.sh
index 69efc51..4c834d9 100755
--- a/t/parallel-tests8.sh
+++ b/t/parallel-tests-srcdir-in-test-name.sh
@@ -15,7 +15,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check parallel-tests features:
-# - generated distributed tests.
 # - listing $(srcdir)/ or $(top_srcdir)/ in TESTS doesn't work ATM,
 #   and is thus diagnosed.
 
@@ -27,47 +26,61 @@
 am_parallel_tests=yes
 . ./defs || Exit 1
 
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
+echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am << 'END'
-TESTS = foo.test
-## the next line will cause automake to error out:
-TESTS += $(srcdir)/bar.test $(top_srcdir)/baz.test
-.in.test:
-       cp $< $@ && chmod +x $@
-check_SCRIPTS = $(TESTS)
-EXTRA_DIST = foo.in foo.test
-DISTCLEANFILES = foo.test
+TESTS = \
+  $(srcdir)/foo \
+  @srcdir@/foo2 \
+  @srcdir@/bar.test \
+  ${srcdir}/sub/baz.test \
+  built.test
+
+XFAIL_TESTS = $(srcdir)/bar.test foo2
+
+built.test:
+       (echo '#!/bin/sh' && echo 'exit 77') >address@hidden
+       chmod a-w,a+x address@hidden && mv -f address@hidden $@
 END
 
-cat > foo.in <<'END'
-#! /bin/sh
-echo "this is $0"
+cat > foo <<'END'
+#!/bin/sh
 exit 0
 END
+chmod a+x foo
+
+cat > foo2 <<'END'
+#!/bin/sh
+exit 1
+END
+chmod a+x foo2
+
+cp foo2 bar.test
+
+mkdir sub
+cp foo sub/baz.test
 
 $ACLOCAL
 $AUTOCONF
-AUTOMAKE_fails -a
-grep '$(srcdir).*TESTS.*bar\.test' stderr
-grep '$(top_srcdir).*TESTS.*baz\.test' stderr
-
-sed '/^TESTS +=.*srcdir/d' < Makefile.am > t
-mv -f t Makefile.am
 $AUTOMAKE -a
 
-./configure
-$MAKE check
-$MAKE distcheck
-$MAKE distclean
-
 mkdir build
 cd build
 ../configure
 $MAKE check
+
+ls -l . .. # For debugging.
+
+test -f built.log
+test -f foo.log
+test -f bar.log
+test -f sub/baz.log
+test -f test-suite.log
+
+test ! -f ../built.log
 test ! -f ../foo.log
-$MAKE distcheck
+test ! -f ../bar.log
+test ! -f ../sub/baz.log
+test ! -f ../test-suite.log
 
 :
diff --git a/t/parallel-tests-unreadable.sh b/t/parallel-tests-unreadable.sh
index 7ddb9db..02b711d 100755
--- a/t/parallel-tests-unreadable.sh
+++ b/t/parallel-tests-unreadable.sh
@@ -34,13 +34,11 @@ END
 
 cat > foo.test << 'END'
 #! /bin/sh
-echo foofoofoo
 exit 0
 END
 
 cat > bar.test << 'END'
 #! /bin/sh
-echo barbarbar
 exit 77
 END
 
@@ -52,25 +50,54 @@ $AUTOMAKE -a
 
 ./configure
 
-for files in \
-  'foo.log bar.log' \
-  'foo.trs bar.trs' \
-  'foo.trs bar.log' \
-  'foo.log bar.trs' \
-; do
+doit ()
+{
+  rm -f $*
   $MAKE check
   rm -f test-suite.log
-  chmod a-r $files
-  $MAKE test-suite.log || { ls -l; Exit 1; }
-  ls -l
-  grep '^foofoofoo$' foo.log
-  grep '^:test-result: PASS' foo.trs
-  grep '^barbarbar$' bar.log
-  grep '^:test-result: SKIP' bar.trs
-  grep '^SKIP: bar' test-suite.log
-  grep '^barbarbar$' test-suite.log
-  $EGREP ':.*foo|foofoofoo' test-suite.log && Exit 1
-  : For shells with busted 'set -e'.
+  chmod a-r $*
+  $MAKE test-suite.log 2>stderr && { cat stderr >&2; Exit 1; }
+  cat stderr >&2
+}
+
+could_not_read ()
+{
+  # We have to settle for weak checks to avoid spurious failures due to
+  # the differences in error massages on different systems; for example:
+  #
+  #   $ cat unreadable-file # GNU/Linux or NetBSD
+  #   cat: unreadable-file: Permission denied
+  #   $ cat unreadable-file # Solaris 10
+  #   cat: cannot open unreadable
+  #
+  #   $ grep foo unreadable-file # GNU/Linux and NetBSD
+  #   grep: unreadable: Permission denied
+  #   $ grep foo unreadable-file # Solaris 10
+  #   grep: can't open "unreadable"
+  #
+  # FIXME: this might still needs adjustments on other systems ...
+  #
+  grep "$1:.*[pP]ermission denied" stderr \
+    || $EGREP "can(no|')t open [\"'\`]?$1" stderr
+}
+
+for lst in bar.log 'foo.log bar.log'; do
+  doit $lst
+  could_not_read bar.log
+  grep 'test-suite\.log:.* I/O error reading test logs' stderr
 done
 
+doit foo.trs
+could_not_read foo.trs
+grep 'test-suite\.log:.* I/O error reading test results' stderr
+
+doit foo.trs bar.trs
+could_not_read foo.trs
+could_not_read bar.trs
+grep 'test-suite\.log:.* I/O error reading test results' stderr
+
+doit foo.trs bar.log
+could_not_read foo.trs
+grep 'test-suite\.log:.* I/O error reading test results' stderr
+
 :
diff --git a/t/parallel-tests8.sh b/t/parallel-tests8.sh
index 69efc51..a36cea7 100755
--- a/t/parallel-tests8.sh
+++ b/t/parallel-tests8.sh
@@ -14,15 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check parallel-tests features:
-# - generated distributed tests.
-# - listing $(srcdir)/ or $(top_srcdir)/ in TESTS doesn't work ATM,
-#   and is thus diagnosed.
-
-# TODO: this test should also ensure that the 'make' implementation
-#       properly adheres to rules in all cases.  See the Autoconf
-#       manual for the ugliness in this area, when VPATH comes into
-#       play.  :-/
+# Check parallel-tests features: generated distributed tests.
 
 am_parallel_tests=yes
 . ./defs || Exit 1
@@ -33,8 +25,6 @@ END
 
 cat > Makefile.am << 'END'
 TESTS = foo.test
-## the next line will cause automake to error out:
-TESTS += $(srcdir)/bar.test $(top_srcdir)/baz.test
 .in.test:
        cp $< $@ && chmod +x $@
 check_SCRIPTS = $(TESTS)
@@ -50,12 +40,6 @@ END
 
 $ACLOCAL
 $AUTOCONF
-AUTOMAKE_fails -a
-grep '$(srcdir).*TESTS.*bar\.test' stderr
-grep '$(top_srcdir).*TESTS.*baz\.test' stderr
-
-sed '/^TESTS +=.*srcdir/d' < Makefile.am > t
-mv -f t Makefile.am
 $AUTOMAKE -a
 
 ./configure
diff --git a/t/self-check-dir.tap b/t/self-check-dir.tap
index 736238c..705b194 100755
--- a/t/self-check-dir.tap
+++ b/t/self-check-dir.tap
@@ -68,7 +68,7 @@ do_check 'do not create nor chdir in testdir' \
          'test ! -d t/_self.dir || Exit 1
           test ! -f t/_self.dir || Exit 1
           test ! -r t/_self.dir || Exit 1
-          grep "self-check-dir\.tap" Makefile || Exit 1
+          grep "compare-autodiffs" Makefile || Exit 1
           case `pwd` in '"$cwd"') : ;; *) Exit 1;; esac'
 
 :
diff --git a/t/serial-tests.sh b/t/serial-tests.sh
index 680513f..2661afa 100755
--- a/t/serial-tests.sh
+++ b/t/serial-tests.sh
@@ -32,8 +32,8 @@ has_parallel_tests ()
 {
   $EGREP '(^| )check-TESTS.*:' $1
   $EGREP '(^| )recheck.*:' $1
-  grep '^\$(TEST_SUITE_LOG): \$(TEST_LOGS)$' $1
-  grep '^\.test\.log:$' $1
+  $EGREP '^\$\(TEST_SUITE_LOG\):.* \$\(TEST_LOGS\)( |$)' $1
+  grep '^%.log %.trs *:.*%\.test' $1
 }
 
 mkdir one two
diff --git a/t/spy-phony.sh b/t/spy-pattern-rules.sh
similarity index 57%
copy from t/spy-phony.sh
copy to t/spy-pattern-rules.sh
index 4e42819..b2bb25d 100755
--- a/t/spy-phony.sh
+++ b/t/spy-pattern-rules.sh
@@ -14,44 +14,41 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check that the '.PHONY' semantics we expect truly hold.
+# Check that, if we have two pattern rules from which the same file (or
+# set of files) can be built, and both are applicable, the first one wins.
+# This is used at least in our 'parallel-tests' support.
 
 am_create_testdir=empty
 . ./defs || Exit 1
 
 cat > Makefile <<'END'
-.PHONY: pdir pfile
-pdir rdir:
-       echo foo > $@/foo
-pfile rfile:
-       echo bar >$@
-.PHONY: other
-other:
-       echo baz >> dummy
-indirect: other
-       echo run > $@
+default:
+
+%.foo: %
+       cp $< $@
+%.foo: %.x
+       cp $< $@
+
+%.bar: %.x
+       cp $< $@
+%.bar: %
+
+%.mu %.fu: %.1
+       cp $< $*.mu && cp $< $*.fu
+%.mu %.fu: %.2
+       cp $< $*.mu && cp $< $*.fu
 END
 
-: > rfile
-mkdir rdir
-$MAKE rdir rfile
-test ! -s rfile
-test ! -f rdir/foo
-
-: > pfile
-mkdir pdir
-$MAKE pdir pfile
-test "`cat pfile`" = bar
-test "`cat pdir/foo`" = foo
-
-$MAKE other
-test "`cat dummy`" = baz
-$MAKE other
-test "`cat dummy`" = "baz${nl}baz"
-
-echo not run > indirect
-$MAKE indirect
-test "`cat indirect`" = run
-test "`cat dummy`" = "baz${nl}baz${nl}baz"
+echo one > all
+echo two > all.x
+$MAKE all.foo all.bar
+diff all all.foo
+diff all.x all.bar
+
+echo one > x.1
+echo two > x.2
+$MAKE x.mu
+diff x.mu x.1
+diff x.fu x.1
 
 :
diff --git a/t/tap-bad-prog.tap b/t/tap-bad-prog.tap
index 580e7d3..5eb1c56 100755
--- a/t/tap-bad-prog.tap
+++ b/t/tap-bad-prog.tap
@@ -30,8 +30,9 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEST_LOG_DRIVER = $(srcdir)/tap-driver
-TESTS = none.test noread.test noexec.test
+LOG_DRIVER = $(srcdir)/tap-driver
+TEST_LOG_DRIVER = $(LOG_DRIVER)
+TESTS = none.test noread noexec.test
 none.test:
 END
 
@@ -41,8 +42,8 @@ echo 1..1
 echo ok 1
 END
 
-cp noexec.test noread.test
-chmod a-r noread.test
+cp noexec.test noread
+chmod a-r noread
 
 $ACLOCAL
 $AUTOCONF
@@ -72,10 +73,10 @@ else
 fi
 
 desc="non-readable test is reported"
-if test -r noread.test; then
+if test -r noread; then
   skip_ -r "any file is readable" "$desc"
 else
-  command_ok_ "$desc" -- grep '^ERROR: noread\.test' stdout
+  command_ok_ "$desc" -- grep '^ERROR: noread' stdout
 fi
 
 # Check that no spurious test result is reported.  This is lower-priority
diff --git a/t/tap-basic.sh b/t/tap-basic.sh
index 96578e5..417c248 100755
--- a/t/tap-basic.sh
+++ b/t/tap-basic.sh
@@ -47,6 +47,8 @@ ok.test:
        echo 'ok 3 # SKIP' >>address@hidden
        cat address@hidden ;: For debugging.
        mv -f address@hidden $@
+
+LOG_DRIVER = false  # Dummy but required.
 END
 
 cat > success.test << 'END'
diff --git a/t/tap-common-setup.sh b/t/tap-common-setup.sh
index b14099a..cd0a14d 100755
--- a/t/tap-common-setup.sh
+++ b/t/tap-common-setup.sh
@@ -19,7 +19,12 @@
 am_parallel_tests=yes
 . ./defs || Exit 1
 
-cat >> configure.ac << END
+cat >> configure.ac << 'END'
+# FIXME: must define this otherwise automake will require the presence
+# FIXME: of the 'test-driver' script.  This issue should be documented
+# FIXME: in the manual ...
+AC_SUBST([LOG_DRIVER],
+         ['$(error LOG_DRIVER should be never used) false'])
 AC_OUTPUT
 END
 
@@ -32,6 +37,7 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
+test ! -f test-driver
 
 ./configure
 
diff --git a/t/tap-diagnostic-custom.sh b/t/tap-diagnostic-custom.sh
index d3f28a5..bb189fd 100755
--- a/t/tap-diagnostic-custom.sh
+++ b/t/tap-diagnostic-custom.sh
@@ -32,6 +32,7 @@ my_log_driver = $(srcdir)/tap-driver
 my_log_compiler = cat
 TEST_EXTENSIONS =
 TESTS =
+LOG_DRIVER = $(error LOG_DRIVER is dummy, required, never extended)
 END
 
 : > later.mk
diff --git a/t/tap-more.sh b/t/tap-more.sh
index 00abbf2..14181b6 100755
--- a/t/tap-more.sh
+++ b/t/tap-more.sh
@@ -29,7 +29,8 @@ am_parallel_tests=yes
 
 fetch_tap_driver
 
-cat >> configure.ac <<END
+cat >> configure.ac << 'END'
+AC_SUBST([LOG_DRIVER], ["dummy but required"])
 AC_SUBST([AM_TEST_LOG_DRIVER_FLAGS], ['--comments'])
 AC_OUTPUT
 END
diff --git a/t/tap-recheck.sh b/t/tap-recheck.sh
index 4b120a5..a2af067 100755
--- a/t/tap-recheck.sh
+++ b/t/tap-recheck.sh
@@ -22,11 +22,12 @@ am_parallel_tests=yes
 
 fetch_tap_driver
 
-cat >> configure.ac <<END
+cat >> configure.ac << 'END'
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+LOG_DRIVER = $(error LOG_DRIVER should never be expanded) false
 TEST_LOG_DRIVER = $(srcdir)/tap-driver
 TESTS = a.test b.test c.test d.test
 END
diff --git a/t/tap-signal.tap b/t/tap-signal.tap
index ba17bd4..867b762 100755
--- a/t/tap-signal.tap
+++ b/t/tap-signal.tap
@@ -67,7 +67,7 @@ chmod a+x *.test
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
 
 ./configure
 
diff --git a/t/test-driver-custom-multitest-recheck.sh 
b/t/test-driver-custom-multitest-recheck.sh
index 9b4f5df..af3d851 100755
--- a/t/test-driver-custom-multitest-recheck.sh
+++ b/t/test-driver-custom-multitest-recheck.sh
@@ -82,7 +82,7 @@ chmod a+x *.test
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
 
 do_recheck ()
 {
diff --git a/t/test-driver-custom-multitest-recheck2.sh 
b/t/test-driver-custom-multitest-recheck2.sh
index cf97135..eef1043 100755
--- a/t/test-driver-custom-multitest-recheck2.sh
+++ b/t/test-driver-custom-multitest-recheck2.sh
@@ -70,7 +70,7 @@ chmod a+x *.test
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
 
 for vpath in : false; do
   if $vpath; then
diff --git a/t/test-driver-custom-multitest.sh 
b/t/test-driver-custom-multitest.sh
index d5e2cf5..caf6a07 100755
--- a/t/test-driver-custom-multitest.sh
+++ b/t/test-driver-custom-multitest.sh
@@ -30,6 +30,8 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+LOG_DRIVER = dummy but required
+
 TEST_EXTENSIONS = .t
 T_LOG_DRIVER = $(SHELL) $(srcdir)/trivial-test-driver
 
diff --git a/t/test-driver-custom-no-extra-driver.sh 
b/t/test-driver-custom-no-extra-driver.sh
index 31000af..5f66f6d 100755
--- a/t/test-driver-custom-no-extra-driver.sh
+++ b/t/test-driver-custom-no-extra-driver.sh
@@ -24,7 +24,7 @@ am_parallel_tests=yes
 cat >> configure.ac <<'END'
 AC_PROG_CC
 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
-AC_SUBST([X_LOG_DRIVER], [none])
+AC_SUBST([LOG_DRIVER], ['unused but required by automake'])
 AC_OUTPUT
 END
 
@@ -32,7 +32,6 @@ mkdir sub1 sub2
 
 cat > Makefile.am <<'END'
 SUBDIRS = sub1 sub2
-LOG_DRIVER =
 TEST_LOG_DRIVER = :
 TESTS = foo bar.test
 END
@@ -41,12 +40,12 @@ cat > sub1/Makefile.am <<'END'
 TEST_EXTENSIONS = .x .sh .pl
 SH_LOG_DRIVER = dummy1
 PL_LOG_DRIVER = dummy2
+X_LOG_DRIVER  = dummy3
 TESTS = a.pl b.sh c.x
 END
 
 cat > sub2/Makefile.am <<'END'
 TEST_EXTENSIONS = .bar
-LOG_DRIVER = x
 BAR_LOG_DRIVER = y
 TESTS = 1 2.bar 3.test 4.t 5.tt $(check_PROGRAMS)
 check_PROGRAMS = p1 p2$(EXEEXT) p3.bar p4.suf
diff --git a/t/test-driver-custom-xfail-tests.sh 
b/t/test-driver-custom-xfail-tests.sh
index 745772f..d883b73 100755
--- a/t/test-driver-custom-xfail-tests.sh
+++ b/t/test-driver-custom-xfail-tests.sh
@@ -136,7 +136,7 @@ chmod a+x td
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE --add-missing
 
 ./configure
 
diff --git a/t/test-driver-fail.sh b/t/test-driver-fail.sh
index 0eb2268..f1c3df8 100755
--- a/t/test-driver-fail.sh
+++ b/t/test-driver-fail.sh
@@ -30,14 +30,16 @@ AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
-TEST_LOG_DRIVER = ./oops
-TESTS = foo.test
+TEST_EXTENSIONS =
+LOG_DRIVER = ./oops
+TESTS = foo
 END
 
-cat > foo.test <<'END'
+cat > foo <<'END'
 #! /bin/sh
 exit 0
 END
+chmod a+x foo
 
 $ACLOCAL
 $AUTOCONF
diff --git a/t/test-driver-strip-vpath.sh b/t/test-driver-strip-vpath.sh
index 9670188..f7adb67 100755
--- a/t/test-driver-strip-vpath.sh
+++ b/t/test-driver-strip-vpath.sh
@@ -39,9 +39,10 @@ cat > Makefile.am << 'END'
 # The $(empty) are for eliciting VPATH rewrites on make implementations
 # that support it (e.g., Solaris make), to improve coverage.
 empty =
-TESTS = $(empty) foo.test src/bar.test ./src/baz.test $(empty)
+TESTS = $(empty) foo.test src/bar.test ./src/baz $(empty)
 $(TESTS):
-TEST_LOG_DRIVER = $(srcdir)/checkstrip-driver
+LOG_DRIVER = $(srcdir)/checkstrip-driver
+TEST_LOG_DRIVER = $(LOG_DRIVER)
 EXTRA_DIST = checkstrip-driver
 END
 
@@ -61,8 +62,10 @@ while test $# -gt 0; do
 done
 echo "test name: $test_name" # For debugging.
 case $test_name in
-  foo.test|./foo.test|src/ba[rz].test|./src/ba[rz].test);;
-  *) exit 1;;
+  foo.test|./foo.test) ;;
+  src/bar.test|./src/bar.test) ;;
+  src/baz|./src/baz) ;;
+  *) exit 1 ;;
 esac
 echo dummy > "$log_file"
 echo dummy > "$trs_file"
diff --git a/t/test-driver-trs-suffix-registered.sh 
b/t/test-driver-trs-suffix-registered.sh
deleted file mode 100755
index 0c3734f..0000000
--- a/t/test-driver-trs-suffix-registered.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# parallel-tests support: the following are registered with '.SUFFIXES':
-#  - .log
-#  - .trs (used by files that store test results and metadata)
-#  - .test if $(TEST_EXTENSIONS) is not defined
-#  - stuff in $(TEST_EXTENSIONS) otherwise
-
-am_parallel_tests=yes
-. ./defs || Exit 1
-
-: > Makefile.am
-
-cat > 1.am << 'END'
-TESTS =
-END
-
-cat > 2.am << 'END'
-TEST_EXTENSIONS = .SH .abcdef
-TESTS =
-END
-
-: > test-driver
-
-$ACLOCAL
-
-$AUTOMAKE 1
-$AUTOMAKE 2
-
-sed -e 's/$/ /' 1.in > mk.1
-sed -e 's/$/ /' 2.in > mk.2
-
-grep '^\.SUFFIXES:' mk.1
-grep '^\.SUFFIXES:' mk.2
-
-for suf in test log trs; do
-  grep "^\\.SUFFIXES:.* \\.$suf " mk.1
-done
-
-for suf in SH abcdef log trs; do
-  grep "^\\.SUFFIXES:.* \\.$suf " mk.2
-done
-
-:
diff --git a/t/test-extensions.sh b/t/test-extensions.sh
index c903798..13c42eb 100755
--- a/t/test-extensions.sh
+++ b/t/test-extensions.sh
@@ -42,7 +42,7 @@ grep -i 'log' Makefile.in # For debugging.
 for lc in $valid_extensions; do
   uc=`echo $lc | tr '[a-z]' '[A-Z]'`
   grep "^${uc}_LOG_DRIVER =" Makefile.in
-  grep "^\.${lc}\.log:" Makefile.in
+  grep "^%\.log %\.trs *:.*%\.${lc}" Makefile.in
 done
 
 # The produced Makefile is not broken.
diff --git a/t/test-metadata-global-log.sh b/t/test-metadata-global-log.sh
index b10f481..5d02e77 100755
--- a/t/test-metadata-global-log.sh
+++ b/t/test-metadata-global-log.sh
@@ -24,6 +24,7 @@ am_parallel_tests=yes
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
+AC_SUBST([LOG_DRIVER], ['ignored but required by autoamke, sigh!'])
 AC_OUTPUT
 END
 
diff --git a/t/test-metadata-global-result.sh b/t/test-metadata-global-result.sh
index b247444..9c0fd48 100755
--- a/t/test-metadata-global-result.sh
+++ b/t/test-metadata-global-result.sh
@@ -29,7 +29,8 @@ cat > Makefile.am << 'END'
 TEST_EXTENSIONS = .test .x
 TEST_LOG_DRIVER = ./dummy-driver
 X_LOG_DRIVER = ./dummy-driver
-TESTS = foo.test zar-doz.test
+LOG_DRIVER = ./dummy-driver
+TESTS = foo.test zar-doz.test mu
 END
 
 cat > dummy-driver <<'END'
@@ -76,6 +77,7 @@ $AUTOMAKE
 : Basic checks.
 
 echo :global-test-result: PASS > foo.test
+echo :global-test-result: PASS > mu
 echo :global-test-result: ERROR > zar-doz.x
 
 $MAKE check
@@ -87,6 +89,11 @@ PASS: foo
 END
 
 have_result <<END
+PASS: mu
+========
+END
+
+have_result <<END
 ERROR: zar-doz
 ==============
 END
@@ -95,6 +102,7 @@ END
 
 echo :global-test-result: PASS/SKIP > foo.test
 echo :global-test-result: ALMOST PASSED > zar-doz.x
+echo :global-test-result: HU? > mu
 
 $MAKE check
 cat test-suite.log
@@ -109,6 +117,11 @@ ALMOST PASSED: zar-doz
 ======================
 END
 
+have_result <<END
+HU?: mu
+=======
+END
+
 : Fields ':test-result:' does not interfere with the global test result.
 
 cat > foo.test << 'END'
@@ -123,6 +136,13 @@ cat > zar-doz.x << 'END'
 :test-result: XFAIL
 END
 
+cat > mu << 'END'
+:test-result: PASS
+:global-test-result: XFAIL
+:test-result: PASS
+:test-result: PASS
+END
+
 $MAKE check && Exit 1
 cat test-suite.log
 
@@ -136,6 +156,11 @@ FAIL: zar-doz
 =============
 END
 
+have_result <<END
+XFAIL: mu
+=========
+END
+
 : What happens when ':global-test-result:' is absent.
 
 cat > foo.test << 'END'
@@ -143,6 +168,7 @@ cat > foo.test << 'END'
 :test-result: ERROR
 END
 : > zar-doz.x
+: > mu
 
 $MAKE check && Exit 1
 cat test-suite.log
@@ -157,10 +183,16 @@ RUN: zar-doz
 ============
 END
 
+have_result <<END
+RUN: mu
+=======
+END
+
 # Leading and trailing whitespace gets eaten/normalized.
 
 echo ":global-test-result:SKIP${tab}   ${tab}${tab}" > foo.test
 echo ":global-test-result:${tab}   ${tab}XFAIL  ${tab}   " > zar-doz.x
+echo ":global-test-result: ${tab} PASS${tab} ${tab}${tab}" > mu
 
 $MAKE check
 cat test-suite.log
@@ -175,10 +207,16 @@ XFAIL: zar-doz
 ==============
 END
 
+have_result <<END
+PASS: mu
+========
+END
+
 # Whitespaces before and after ':global-test-result:' are handled OK.
 
 echo "   $tab:global-test-result:PASS" > foo.test
 echo "${tab}${tab}:global-test-result:${tab}   ${tab}SKIP" > zar-doz.x
+echo " :global-test-result:${tab}SKIP" > mu
 
 $MAKE check
 cat test-suite.log
@@ -193,4 +231,9 @@ SKIP: zar-doz
 =============
 END
 
+have_result <<END
+SKIP: mu
+========
+END
+
 :
diff --git a/t/test-metadata-results.sh b/t/test-metadata-results.sh
index 5978f7f..1cafbb5 100755
--- a/t/test-metadata-results.sh
+++ b/t/test-metadata-results.sh
@@ -25,8 +25,9 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEST_LOG_DRIVER = ./dummy-driver
-TESTS = foo.test bar.test
+LOG_DRIVER = ./dummy-driver
+TEST_LOG_DRIVER = ${LOG_DRIVER}
+TESTS = foo.test bar
 END
 
 cat > dummy-driver <<'END'
@@ -88,7 +89,7 @@ $AUTOMAKE
 # "old-style" directives with format "RESULT: test-name" are now ignored.
 
 : > foo.test
-echo blah blah blah > bar.test
+echo blah blah blah > bar
 mk_check
 count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
 
@@ -96,7 +97,7 @@ cat > foo.test <<END
 :test-global-result: PASS
 :test-result: FAIL
 END
-cat > bar.test <<END
+cat > bar <<END
 :test-result: SKIP
 :test-global-result: ERROR
 END
@@ -108,7 +109,7 @@ FAIL: foo.test
 :test-result: PASS
 :test-global-result: XPASS
 END
-echo ERROR: bar.test > bar.test
+echo ERROR: bar > bar
 mk_check
 count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
 
@@ -116,7 +117,7 @@ cat > foo.test <<END
 :test-global-result: SKIP
 :test-result: FAIL
 END
-cat > bar.test <<END
+cat > bar <<END
 :test-global-result: PASS
 END
 mk_check && Exit 1
@@ -127,7 +128,7 @@ cat > foo.test <<END
 :test-result: PASS
 :test-result: SKIP
 END
-cat > bar.test <<END
+cat > bar <<END
 :test-result: SKIP
 :test-result: PASS
 :test-result: SKIP
@@ -147,18 +148,18 @@ cat > foo.test <<END
 :test-result: XPASS
 :test-result: ERROR
 END
-: > bar.test
+: > bar
 mk_check && Exit 1
 count_test_results total=6 pass=1 fail=1 xpass=1 xfail=1 skip=1 error=1
 
-cp foo.test bar.test
+cp foo.test bar
 mk_check && Exit 1
 count_test_results total=12 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=2
 
 # Check that we are liberal w.r.t. whitespace use.
 
 : > foo.test
-: > bar.test
+: > bar
 for RESULT in PASS FAIL XPASS XFAIL SKIP ERROR; do
   sed -e 's/^ *//' -e 's/|//g' >> foo.test <<END
     |:test-result:$RESULT|
@@ -166,10 +167,10 @@ for RESULT in PASS FAIL XPASS XFAIL SKIP ERROR; do
     |:test-result:$RESULT  $tab|
     |:test-result:$tab$tab  $RESULT$tab  $tab |
 END
-  echo "  $tab $tab$tab   :test-result: $RESULT" >> bar.test
+  echo "  $tab $tab$tab   :test-result: $RESULT" >> bar
 done
 cat foo.test # For debugging.
-cat bar.test # Likewise.
+cat bar # Likewise.
 mk_check && Exit 1
 count_test_results total=30 pass=5 fail=5 xpass=5 xfail=5 skip=5 error=5
 
diff --git a/t/test-missing2.sh b/t/test-missing2.sh
deleted file mode 100755
index dadc1b0..0000000
--- a/t/test-missing2.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# parallel-tests:
-#  - non-existent scripts listed in TESTS get diagnosed, even when
-#    all the $(TEST_LOGS) have a dummy dependency.
-# See also related test 'test-missing.test'.
-
-am_parallel_tests=yes
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-TESTS = foobar1.test foobar2.test
-$(TEST_LOGS):
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-
-$MAKE foobar1.log foobar2.log || Exit 99
-test ! -f foobar1.log || Exit 99
-test ! -f foobar1.trs || Exit 99
-test ! -f foobar2.log || Exit 99
-test ! -f foobar2.trs || Exit 99
-
-$MAKE check 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'test-suite\.log.*foobar1\.log' stderr
-grep 'test-suite\.log.*foobar1\.trs' stderr
-grep 'test-suite\.log.*foobar2\.log' stderr
-grep 'test-suite\.log.*foobar2\.trs' stderr
-test ! -f test-suite.log
-
-:
diff --git a/t/test-trs-basic.sh b/t/test-trs-basic.sh
index 55206e9..c988400 100755
--- a/t/test-trs-basic.sh
+++ b/t/test-trs-basic.sh
@@ -32,9 +32,10 @@ TEST_LOG_COMPILER = $(SHELL)
 SH_LOG_COMPILER = $(SHELL)
 
 ## Used to check some internal details.  And yes, the quotes around
-## '$bases' are deliberate: they check for whitespace normalization.
+## $(am__TESTS_BASES) are deliberate: they check for whitespace
+## normalization.
 tb:
-       $(am__set_TESTS_bases); echo "$$bases" > $@
+       echo '$(am__TEST_BASES)' > $@
 END
 
 cat > foo.test << 'END'
diff --git a/t/parallel-tests-once.sh b/t/test-trs-recover-parallel.sh
similarity index 55%
copy from t/parallel-tests-once.sh
copy to t/test-trs-recover-parallel.sh
index 53ee677..0a03bdf 100755
--- a/t/parallel-tests-once.sh
+++ b/t/test-trs-recover-parallel.sh
@@ -14,27 +14,27 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Tests shouldn't be run multiple times by a simple "make check" in a
-# clean directory.  An early implementation of the '.trs' intermediate
-# files incurred a similar problem.
+# Check parallel harness features:
+#  - recovery from deleted '.log' and '.trs' files, with parallel make
 
 am_parallel_tests=yes
 . ./defs || Exit 1
 
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
+all= log= trs=
+for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
+  all="$all $i" log="$log $i" trs="$trs $i"
+done
 
-cat > Makefile.am << 'END'
-TESTS = foo.test
-END
+echo AC_OUTPUT >> configure.ac
+echo TESTS = > Makefile.am
 
-cat > foo.test <<'END'
-#! /bin/sh
-test -f foo.run && Exit 1
-: > foo.run
-END
-chmod a+x foo.test
+for i in $all; do
+  echo TESTS += $i.test >> Makefile.am
+  (echo "#!/bin/sh" && echo "mkdir $i.d") > $i.test
+  chmod a+x $i.test
+done
+
+ls -l # For debugging.
 
 $ACLOCAL
 $AUTOCONF
@@ -42,7 +42,19 @@ $AUTOMAKE -a
 
 ./configure
 
+: Create the required log files.
 $MAKE check
-test -f foo.run # Sanity check.
+
+for n in 1 2 5 7 12; do
+  for suf in log trs; do
+    rmdir *.d
+    rm -f *.$suf
+    $MAKE -j$n check
+    for f in $all; do
+      test -f $f.log
+      test -f $f.trs
+    done
+  done
+done
 
 :
diff --git a/t/test-trs-recover2.sh b/t/test-trs-recover2.sh
deleted file mode 100755
index ba59743..0000000
--- a/t/test-trs-recover2.sh
+++ /dev/null
@@ -1,133 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check parallel harness features:
-#  - recovery from unreadable '.trs' files, in various scenarios
-
-am_parallel_tests=yes
-. ./defs || Exit 1
-
-cat >> configure.ac <<END
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-TESTS = foo.test bar.test
-TEST_LOG_COMPILER = true
-END
-
-: > foo.test
-: > bar.test
-
-TEST_STATUS=0; export TEST_STATUS
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-
-: > t
-chmod a-r t
-test ! -r t || Exit 77
-rm -f t
-
-: Create the required log files.
-$MAKE check
-test -f foo.trs
-test -f bar.trs
-
-: Recreate with a sweeping "make check".
-chmod a-r bar.trs
-$MAKE check
-test -f foo.trs
-test -r foo.trs
-test -f bar.trs
-test -r bar.trs
-
-: Again, this time with one .trs file missing and the other
-: one unreadable.
-rm -f foo.trs
-chmod a-r bar.trs
-$MAKE check
-test -f foo.trs
-test -r foo.trs
-test -f bar.trs
-test -r bar.trs
-
-: Again, but using "make recheck" this time.
-rm -f foo.trs
-chmod a-r bar.trs
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
-cat stdout
-test -f foo.trs
-test -r foo.trs
-test -f bar.trs
-test -r bar.trs
-grep '^PASS: foo\.test' stdout
-grep '^PASS: bar\.test' stdout
-
-: More complex interactions with "make recheck" are OK.
-chmod a-r bar.log bar.trs
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
-cat stdout
-test -f bar.trs
-test -r bar.trs
-grep '^PASS: bar\.test' stdout
-grep 'foo\.test' stdout && Exit 1
-count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
-
-: Recreate by remaking the global test log.
-chmod a-r foo.trs
-rm -f test-suite.log
-$MAKE test-suite.log >stdout || { cat stdout; Exit 1; }
-cat stdout
-test -f foo.trs
-test -r foo.trs
-grep '^PASS: foo\.test' stdout
-grep 'bar\.test' stdout && Exit 1
-# Also test that have only run before should be counted in the final
-# testsuite summary.
-grep '^# TOTAL:  *2$' stdout
-
-: Setup for the next check.
-: > baz.test
-sed 's/^TESTS =.*/& baz.test/' Makefile > t
-diff t Makefile && Exit 99
-mv -f t Makefile
-$MAKE check
-test -f foo.trs
-test -f bar.trs
-test -f baz.trs
-
-: Interactions with lazy test reruns are OK.
-chmod a-r foo.trs
-$sleep
-touch stamp
-$sleep
-touch bar.test
-$MAKE RECHECK_LOGS= check >stdout || { cat stdout; Exit 1; }
-cat stdout
-test -r foo.trs
-is_newest bar.trs bar.test
-grep '^PASS: foo\.test' stdout
-grep '^PASS: bar\.test' stdout
-grep 'baz\.test' stdout && Exit 1
-# Also test that have only run before should be counted in the final
-# testsuite summary.
-grep '^# TOTAL:  *3$' stdout
-
-:


hooks/post-receive
-- 
GNU Automake



reply via email to

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