automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-886-g851e77a
Date: Wed, 01 Jun 2011 14:41:19 +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=851e77acaa6a24bd9a50b5c4dc3923228c265c6c

The branch, testsuite-work has been updated
       via  851e77acaa6a24bd9a50b5c4dc3923228c265c6c (commit)
       via  908d335c0e02191c46f955fa6c7d6b6497de85e8 (commit)
       via  087f0c707d2337b8d9601a003d0b5fcea7f3160f (commit)
       via  0a73aff7c63518d30b87ed36596c6f25afc01aaa (commit)
       via  3eb059190213c60a9f201f671f1c69d6eed6bd7d (commit)
       via  d235db335eaae0934ede72698395f8591d115f9a (commit)
       via  8a8890a9152528a4fc348bb15b27ebb2a4c3b7cb (commit)
       via  e5699648000facb8138b594fe271fbb27296fb72 (commit)
       via  2e12798cb90f9d603285c77ee79f5f9ae658abde (commit)
       via  aa6883fdcf1e7f21ea81fe4745c0018a9398d43f (commit)
      from  1936aaa83cd7d645155a6e21a68db269d5f68f3f (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 851e77acaa6a24bd9a50b5c4dc3923228c265c6c
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jun 1 16:33:07 2011 +0200

    tests: fix spurious failures in self tests
    
    Our ad-hoc usage of `tests/defs' in the testsuite's self tests
    stopped working properly when we made the test scripts re-execute
    themselves with the configure-time $SHELL.  Fix this.
    
    Fixes a bug introduced by commit 'v1.11-874-g1321be7'.
    
    * tests/defs: Only check that we can find the client test script
    when we must re-execute it.
    * tests/self-check-cleanup.test: Export `AM_TESTS_REEXEC' to "no"
    before running the self tests.
    * tests/self-check-dir.test: Likewise.
    * tests/self-check-explicit-skips.test: Likewise.
    * tests/self-check-me.test: Likewise.
    * tests/self-check-sanity.test: Likewise.
    * tests/self-check-reexec.test: New test.
    * tests/Makefile.am (TESTS): Update.

commit 908d335c0e02191c46f955fa6c7d6b6497de85e8
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jun 1 12:09:23 2011 +0200

    tests: prefer ulimit over timeout in test on a memory-hogging bug
    
    * tests/cond29.test: Use 'ulimit' instead of 'timeout' to ensure
    that automake does not uses up too much resources.  This is really
    and improvement because the bug tested by this script wasn't just
    a "it hangs" or "it runs too slow" bug, but rather a memory-hogging
    bug (due to combinatorial explosion when many Automake conditionals
    had to be handled) which could easily crash the whole system, which
    is unacceptable.  The requirement of a proper and working 'ulimit'
    builtin might cause the test to be skipped on more systems, but
    that shouldn't be a problem since the bug isn't about a portability
    issue, but is rather an automake internal implementation problem.
    I've verified that the test as updated by this patch still passes
    with automake 1.8.5, automake 1.10.2, and obviously the development
    version of automake, and that it fails with automake 1.7.9.

commit 087f0c707d2337b8d9601a003d0b5fcea7f3160f
Author: Stefano Lattarini <address@hidden>
Date:   Tue May 31 21:42:16 2011 +0200

    testsuite: avoid generating `*-p.test' tests, use a wrapper script
    
    The generated `*-p.test' tests had already become just thin layers
    around the corresponding test scripts.  This change makes the final
    step, converting to the use of a generic wrapper script and thus
    avoiding the extra test generation (similarly to what is done for
    the `*.instspc' and `*.depmod' tests).
    
    * tests/parallel-tests.sh: New file, driver script to run checks
    the on the `parallel-tests' semantics by wrapping tests that use
    the generic "Simple Tests" driver.
    * tests/gen-parallel-tests: Update, mostly to reflect the new
    `.ptest' extensions used for tests in $(parallel_tests).
    * Makefile.am (TESTS_EXTENSIONS): Add `.ptest'.
    (PTEST_LOG_COMPILER): Define, it calls `parallel-tests.sh'.
    ($(parallel_tests)): Do not really generate `*-p.test' tests
    anymore; this is now just a dummy dependency declaration required
    in order to have make actually produce expected log files from
    the `.ptest.log' suffix rule.
    (EXTRA_DIST): Distribute `parallel-tests.sh'.
    (MAINTAINERCLEANFILES): Don't remove the `$(parallel_tests)', it
    is not necessary anymore.
    (generated_tests): Variable definition removed.
    (TESTS): Update, by listing `$(parallel_tests)' directly instead
    of `$(generated_tests)'
    (expected_list_of_tests): Remove `$(generated_tests)'.
    (maintainer-check-list-of-tests): No need to explicitly depend on
    `$(expected_list_of_tests)' anymore.

commit 0a73aff7c63518d30b87ed36596c6f25afc01aaa
Merge: e569964 3eb0591
Author: Stefano Lattarini <address@hidden>
Date:   Tue May 31 18:07:56 2011 +0200

    Merge branch 'master' into testsuite-work
    
    * master:
      automake, aclocal: honour configure-time AUTOCONF and AUTOM4TE
      build: the user can override AUTOM4TE, AUTORECONF and AUTOUPDATE too
      tests/README: fix example about `make -e' usage

commit 3eb059190213c60a9f201f671f1c69d6eed6bd7d
Merge: 1e18d5d d235db3
Author: Stefano Lattarini <address@hidden>
Date:   Tue May 31 18:03:48 2011 +0200

    Merge branch 'maint'
    
    * maint:
      automake, aclocal: honour configure-time AUTOCONF and AUTOM4TE
      build: the user can override AUTOM4TE, AUTORECONF and AUTOUPDATE too
      tests/README: fix example about `make -e' usage

commit e5699648000facb8138b594fe271fbb27296fb72
Author: Stefano Lattarini <address@hidden>
Date:   Sun May 29 18:13:11 2011 +0200

    tests: don't require gfortran if any fortran compiler is enough
    
    * tests/silentf90.test ($required): Require `fortran', not
    `gfortran'.
    * tests/silentf77.test ($required): Require `fortran77', not
    `gfortran'.
    * tests/silent-many-generic.test ($required): Require `fortran'
    and `fortran77' rather than `gfortran'.

commit 2e12798cb90f9d603285c77ee79f5f9ae658abde
Author: Stefano Lattarini <address@hidden>
Date:   Fri May 27 15:05:40 2011 +0200

    tests: improve `ccnoco*.test', better cross-compiling support
    
    * tests/ccnoco3.test (Mycomp): Use the `$CC' chosen by `tests/defs'
    instead of forcing `gcc' unconditionally.  This ensures better
    coverage in case of cross-compiling, when GCC can be named e.g.,
    `i586-mingw32msvc-gcc', instead of simply `gcc'.
    * tests/ccnoco.test: Likewise.  Remove redundant checks.  Modernize
    the created `configure.in'.  Run tests both in-tree and in VPATH.
    Export `CC' to the overridden value only once.
    * tests/ccnoco2.test: Slightly stricter grepping of automake
    stderr.  Add trailing `:' command.

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

Summary of changes:
 ChangeLog                            |  137 ++++++++++++++++++++++++++++++++++
 Makefile.am                          |    2 +
 Makefile.in                          |    5 +
 NEWS                                 |    4 +
 THANKS                               |    1 +
 aclocal.in                           |    2 +-
 automake.in                          |    2 +-
 configure                            |   12 +++-
 configure.ac                         |    6 +-
 doc/Makefile.am                      |   10 ++-
 doc/Makefile.in                      |   13 +++-
 lib/Automake/Makefile.in             |    3 +
 lib/Automake/tests/Makefile.in       |    3 +
 lib/Makefile.in                      |    3 +
 lib/am/Makefile.in                   |    3 +
 m4/Makefile.in                       |    3 +
 tests/Makefile.am                    |   42 +++-------
 tests/Makefile.in                    |   73 ++++++++----------
 tests/README                         |    6 +-
 tests/ccnoco.test                    |   63 +++++++---------
 tests/ccnoco2.test                   |    6 +-
 tests/ccnoco3.test                   |   10 ++-
 tests/cond29.test                    |   22 ++---
 tests/defs                           |   11 +--
 tests/defs-static.in                 |    4 +-
 tests/gen-parallel-tests             |    7 +-
 tests/parallel-tests.sh              |   52 +++++++++++++
 tests/self-check-cleanup.test        |    2 +
 tests/self-check-dir.test            |    2 +
 tests/self-check-explicit-skips.test |    1 +
 tests/self-check-me.test             |    2 +
 tests/self-check-reexec.test         |  116 ++++++++++++++++++++++++++++
 tests/self-check-sanity.test         |    2 +
 tests/silent-many-generic.test       |    3 +-
 tests/silentf77.test                 |    2 +-
 tests/silentf90.test                 |    2 +-
 36 files changed, 487 insertions(+), 150 deletions(-)
 create mode 100755 tests/parallel-tests.sh
 create mode 100755 tests/self-check-reexec.test

diff --git a/ChangeLog b/ChangeLog
index 91f4f99..7100f28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,140 @@
+2011-06-01  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failures in self tests
+       Our ad-hoc usage of `tests/defs' in the testsuite's self tests
+       stopped working properly when we made the test scripts re-execute
+       themselves with the configure-time $SHELL.  Fix this.
+       Fixes a bug introduced by commit 'v1.11-874-g1321be7'.
+       * tests/defs: Only check that we can find the client test script
+       when we must re-execute it.
+       * tests/self-check-cleanup.test: Export `AM_TESTS_REEXEC' to "no"
+       before running the self tests.
+       * tests/self-check-dir.test: Likewise.
+       * tests/self-check-explicit-skips.test: Likewise.
+       * tests/self-check-me.test: Likewise.
+       * tests/self-check-sanity.test: Likewise.
+       * tests/self-check-reexec.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-06-01  Stefano Lattarini  <address@hidden>
+
+       tests: prefer ulimit over timeout in test on a memory-hogging bug
+       * tests/cond29.test: Use 'ulimit' instead of 'timeout' to ensure
+       that automake does not uses up too much resources.  This is really
+       and improvement because the bug tested by this script wasn't just
+       a "it hangs" or "it runs too slow" bug, but rather a memory-hogging
+       bug (due to combinatorial explosion when many Automake conditionals
+       had to be handled) which could easily crash the whole system, which
+       is unacceptable.  The requirement of a proper and working 'ulimit'
+       builtin might cause the test to be skipped on more systems, but
+       that shouldn't be a problem since the bug isn't about a portability
+       issue, but is rather an automake internal implementation problem.
+       I've verified that the test as updated by this patch still passes
+       with automake 1.8.5, automake 1.10.2, and obviously the development
+       version of automake, and that it fails with automake 1.7.9.
+
+2011-06-01  Stefano Lattarini  <address@hidden>
+
+       testsuite: avoid generating `*-p.test' tests, use a wrapper script
+       The generated `*-p.test' tests had already become just thin layers
+       around the corresponding test scripts.  This change makes the final
+       step, converting to the use of a generic wrapper script and thus
+       avoiding the extra test generation (similarly to what is done for
+       the `*.instspc' and `*.depmod' tests).
+       * tests/parallel-tests.sh: New file, driver script to run checks
+       the on the `parallel-tests' semantics by wrapping tests that use
+       the generic "Simple Tests" driver.
+       * tests/gen-parallel-tests: Update, mostly to reflect the new
+       `.ptest' extensions used for tests in $(parallel_tests).
+       * Makefile.am (TESTS_EXTENSIONS): Add `.ptest'.
+       (PTEST_LOG_COMPILER): Define, it calls `parallel-tests.sh'.
+       ($(parallel_tests)): Do not really generate `*-p.test' tests
+       anymore; this is now just a dummy dependency declaration required
+       in order to have make actually produce expected log files from
+       the `.ptest.log' suffix rule.
+       (EXTRA_DIST): Distribute `parallel-tests.sh'.
+       (MAINTAINERCLEANFILES): Don't remove the `$(parallel_tests)', it
+       is not necessary anymore.
+       (generated_tests): Variable definition removed.
+       (TESTS): Update, by listing `$(parallel_tests)' directly instead
+       of `$(generated_tests)'
+       (expected_list_of_tests): Remove `$(generated_tests)'.
+       (maintainer-check-list-of-tests): No need to explicitly depend on
+       `$(expected_list_of_tests)' anymore.
+
+2011-05-29  Stefano Lattarini  <address@hidden>
+
+       automake, aclocal: honour configure-time AUTOCONF and AUTOM4TE
+       Currently, the Automake's own configure script allow definition
+       of AUTOCONF and AUTOM4TE, expected to point respectively to an
+       autoconf and autom4te programs.  But while these definitions are
+       honoured in the Automake's build systems and test suite, they
+       were *not* honoured in the generated `automake' and `aclocal'
+       scripts.  This behaviour, apart from being wrong in that it does
+       not allow the user enough freedom in choosing his tools, also
+       caused inconsistencies in the test suite, brining to spurious
+       failures.
+       Problem reported by Graham Reitz on the automake list; see thread:
+       <http://lists.gnu.org/archive/html/automake/2011-05/msg00022.html>
+       * automake.in ($traces): Use address@hidden', not simply `autoconf'.
+       * aclocal.in ($traces): Use address@hidden', not simply `autom4te'.
+       * Makefile.am (do_subst): Substitute also address@hidden' and
+       address@hidden'.
+       * NEWS: Update.
+       * THANKS: Update.
+
+2011-05-29  Stefano Lattarini  <address@hidden>
+
+       build: the user can override AUTOM4TE, AUTORECONF and AUTOUPDATE too
+       Our build system allows the user to override AUTOCONF and AUTOHEADER
+       at configure time, and honours these overrides in our testsuite.
+       But it didn't do the same with AUTOM4TE, AUTORECONF and AUTOUPDATE.
+       This change fixes that inconsistency.
+       * configure.ac (am_AUTOM4TE, am_AUTOUPDATE, am_AUTORECONF): New
+       AC_SUBSTitutions.  Update comments.
+       * tests/defs.in ($AUTOUPDATE): Default to address@hidden@' now.
+       ($AUTOM4TE): New variable, defaulting to address@hidden@'.
+       ($AUTORECONF): New variable, defaulting to address@hidden@'.
+       * doc/Makefile.am ($(srcdir)/amhello-1.0.tar.gz): Update.
+
+2011-05-22  Ralf Wildenhues  <address@hidden>
+           Stefano Lattarini  <address@hidden>
+
+       tests/README: fix example about `make -e' usage
+       * tests/README (Section "Writing test cases" subsection "Do"): When
+       some variable is never initialized in the Makefile, `-e' is not
+       necessary in order to override it.  DESTDIR is such a variable: we
+       ensure that we do not ever initialize it.  And as such, it is quite
+       portable to use:
+         $ make DESTDIR=/foo/bar install
+       and in fact, quite widely used.
+       So our example about when `make -e' is required, which references
+       the `DESTDIR' variable, is poorly chosen, if not downright wrong.
+       Rewrite it to use `prefix' as the overridden variable instead.
+
+2011-05-29  Stefano Lattarini  <address@hidden>
+
+       tests: don't require gfortran if any fortran compiler is enough
+       * tests/silentf90.test ($required): Require `fortran', not
+       `gfortran'.
+       * tests/silentf77.test ($required): Require `fortran77', not
+       `gfortran'.
+       * tests/silent-many-generic.test ($required): Require `fortran'
+       and `fortran77' rather than `gfortran'.
+
+2011-05-27  Stefano Lattarini  <address@hidden>
+
+       tests: improve `ccnoco*.test', better cross-compiling support
+       * tests/ccnoco3.test (Mycomp): Use the `$CC' chosen by `tests/defs'
+       instead of forcing `gcc' unconditionally.  This ensures better
+       coverage in case of cross-compiling, when GCC can be named e.g.,
+       `i586-mingw32msvc-gcc', instead of simply `gcc'.
+       * tests/ccnoco.test: Likewise.  Remove redundant checks.  Modernize
+       the created `configure.in'.  Run tests both in-tree and in VPATH.
+       Export `CC' to the overridden value only once.
+       * tests/ccnoco2.test: Slightly stricter grepping of automake
+       stderr.  Add trailing `:' command.
+
 2011-05-27  Stefano Lattarini  <address@hidden>
 
        testsuite: each test case depends on `defs-static'
diff --git a/Makefile.am b/Makefile.am
index 9f98106..2d4d443 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -78,6 +78,8 @@ do_subst = sed \
   -e 's,address@hidden@],$(PERL),g' \
   -e 's,address@hidden@],$(PERL_THREADS),g' \
   -e 's,address@hidden@],$(SHELL),g' \
+  -e 's,address@hidden@],$(am_AUTOCONF),g' \
+  -e 's,address@hidden@],$(am_AUTOM4TE),g' \
   -e 's,address@hidden@],$(VERSION),g' \
   -e 's,address@hidden@],Generated from address@hidden; do not edit by 
hand.,g' \
   -e 's,address@hidden@],$(datadir),g'
diff --git a/Makefile.in b/Makefile.in
index 9514291..1a179ab 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -205,6 +205,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -277,6 +280,8 @@ do_subst = sed \
   -e 's,address@hidden@],$(PERL),g' \
   -e 's,address@hidden@],$(PERL_THREADS),g' \
   -e 's,address@hidden@],$(SHELL),g' \
+  -e 's,address@hidden@],$(am_AUTOCONF),g' \
+  -e 's,address@hidden@],$(am_AUTOM4TE),g' \
   -e 's,address@hidden@],$(VERSION),g' \
   -e 's,address@hidden@],Generated from address@hidden; do not edit by 
hand.,g' \
   -e 's,address@hidden@],$(datadir),g'
diff --git a/NEWS b/NEWS
index df4179b..3c8f8ce 100644
--- a/NEWS
+++ b/NEWS
@@ -125,6 +125,10 @@ Bugs fixed in 1.11a:
 
   - Java sources specified with check_JAVA are not compiled anymore upon
     "make all", but only upon "make check".
+
+  - Now aclocal and automake, when they've to spawn autoconf or autom4te
+    processes, honour the configure-time definitions of AUTOCONF and
+    AUTOM4TE.
 
 New in 1.11:
 
diff --git a/THANKS b/THANKS
index 96d215e..0f4499d 100644
--- a/THANKS
+++ b/THANKS
@@ -118,6 +118,7 @@ Geoffrey Keating    address@hidden
 Glenn Amerine          address@hidden
 Gord Matzigkeit                address@hidden
 Gordon Sadler          address@hidden
+Graham Reitz           address@hidden
 Greg A. Woods          address@hidden
 Greg Schafer           address@hidden
 Guido Draheim          address@hidden
diff --git a/aclocal.in b/aclocal.in
index 11bb9ee..394aeae 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -662,7 +662,7 @@ sub trace_used_macros ()
   my %files = map { $map{$_} => 1 } keys %macro_seen;
   %files = strip_redundant_includes %files;
 
-  my $traces = ($ENV{AUTOM4TE} || 'autom4te');
+  my $traces = ($ENV{AUTOM4TE} || '@am_AUTOM4TE@');
   $traces .= " --language Autoconf-without-aclocal-m4 ";
   # All candidate files.
   $traces .= join (' ',
diff --git a/automake.in b/automake.in
index a1c6f30..3d6993a 100644
--- a/automake.in
+++ b/automake.in
@@ -5313,7 +5313,7 @@ sub scan_autoconf_traces ($)
                sinclude => 1,
              );
 
-  my $traces = ($ENV{AUTOCONF} || 'autoconf') . " ";
+  my $traces = ($ENV{AUTOCONF} || '@am_AUTOCONF@') . " ";
 
   # Use a separator unlikely to be used, not `:', the default, which
   # has a precise meaning for AC_CONFIG_FILES and so on.
diff --git a/configure b/configure
index 723491c..499015d 100755
--- a/configure
+++ b/configure
@@ -605,7 +605,10 @@ am__isrc
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
+am_AUTOUPDATE
 am_AUTOHEADER
+am_AUTORECONF
+am_AUTOM4TE
 am_AUTOCONF
 host_os
 host_vendor
@@ -1823,11 +1826,18 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 
's/ /-/g'`;; esac
 
 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this
 # way we can run Autoconf tests from configure (or from the test
-# suite) without being bothered by `missing'.  Likewise for autoheader.
+# suite) without being bothered by `missing'.  Likewise for autom4te,
+# autoreconf, autoheader, and autoupdate.
 am_AUTOCONF="${AUTOCONF-autoconf}"
 
+am_AUTOM4TE="${AUTOM4TE-autom4te}"
+
+am_AUTORECONF="${AUTORECONF-autoreconf}"
+
 am_AUTOHEADER="${AUTOHEADER-autoheader}"
 
+am_AUTOUPDATE="${AUTOUPDATE-autoupdate}"
+
 
 am__api_version='1.11a'
 
diff --git a/configure.ac b/configure.ac
index b6a5586..cf3df4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,9 +30,13 @@ AC_CANONICAL_BUILD
 
 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this
 # way we can run Autoconf tests from configure (or from the test
-# suite) without being bothered by `missing'.  Likewise for autoheader.
+# suite) without being bothered by `missing'.  Likewise for autom4te,
+# autoreconf, autoheader, and autoupdate.
 AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"])
+AC_SUBST([am_AUTOM4TE], ["${AUTOM4TE-autom4te}"])
+AC_SUBST([am_AUTORECONF], ["${AUTORECONF-autoreconf}"])
 AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
+AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"])
 
 AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests
                  parallel-tests silent-rules])
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 01cf663..ae4016c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -73,8 +73,14 @@ $(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) 
$(top_srcdir)/configure.ac
        $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
        export PATH && \
        cd $(srcdir)/amhello && \
-       ACLOCAL=aclocal-$(APIVERSION) AUTOMAKE=automake-$(APIVERSION) \
-       autoreconf -vfi && \
+       ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL && \
+       AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE && \
+       AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF && \
+       AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE && \
+       AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF && \
+       AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER && \
+       AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE && \
+       $(am_AUTORECONF) -vfi && \
        ./configure && \
        $(MAKE) $(AM_MAKEFLAGS) distcheck && \
        $(MAKE) $(AM_MAKEFLAGS) distclean && \
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 193c9fe..1e53970 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -190,6 +190,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -865,8 +868,14 @@ $(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) 
$(top_srcdir)/configure.ac
        $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
        export PATH && \
        cd $(srcdir)/amhello && \
-       ACLOCAL=aclocal-$(APIVERSION) AUTOMAKE=automake-$(APIVERSION) \
-       autoreconf -vfi && \
+       ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL && \
+       AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE && \
+       AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF && \
+       AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE && \
+       AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF && \
+       AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER && \
+       AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE && \
+       $(am_AUTORECONF) -vfi && \
        ./configure && \
        $(MAKE) $(AM_MAKEFLAGS) distcheck && \
        $(MAKE) $(AM_MAKEFLAGS) distclean && \
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index 93cbf39..76c82df 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -189,6 +189,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 8ade033..fa58350 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -239,6 +239,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 1f6e5e5..737be4a 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -192,6 +192,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index e4b0ec2..35e5471 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -149,6 +149,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
diff --git a/m4/Makefile.in b/m4/Makefile.in
index b876b3d..2b3b06a 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -149,6 +149,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3d1e5c4..0bb993a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -38,31 +38,17 @@ include $(srcdir)/parallel-tests.am
 
 $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
        $(AM_V_GEN)($(am__cd) $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+EXTRA_DIST += gen-parallel-tests
 
-$(parallel_tests): Makefile.am
-       $(AM_V_at)rm -f $@ address@hidden
-       $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
-       { echo '#!/bin/sh'; \
-         echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
-         echo; \
-         echo '# Ensure proper definition of $$testsrcdir.'; \
-         echo '. ./defs-static || exit 99'; \
-         echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
-         echo; \
-         echo "# Run the test with Automake's parallel-tests driver enabled."; 
\
-         echo 'parallel_tests=yes'; \
-         echo "# In the spirit of VPATH, we prefer a test in the build tree"; \
-         echo "# over one in the source tree."; \
-         echo "if test -f \"./$$input\"; then"; \
-         echo "  . \"./$$input\""; \
-         echo 'else'; \
-         echo "  . \"\$$testsrcdir/$$input\""; \
-         echo 'fi'; \
-       } > address@hidden
-       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+TEST_EXTENSIONS += .ptest
+PTEST_LOG_COMPILER = $(SHELL) $(srcdir)/parallel-tests.sh
+EXTRA_DIST += parallel-tests.sh
 
-MAINTAINERCLEANFILES += $(parallel_tests)
-EXTRA_DIST += gen-parallel-tests
+# All `*-p.ptest' tests work by sourcing the script `parallel-tests.sh'.
+$(parallel_tests:.ptest=.log): parallel-tests.sh
+# This dummy declaration is required to have make actually produce
+# expected log files from the `.ptest.log' suffix rule.
+$(parallel_tests):
 
 
 include $(srcdir)/instspc-tests.am
@@ -126,13 +112,11 @@ AM_TESTS_ENVIRONMENT = \
 
 TESTS = \
   $(handwritten_tests) \
-  $(generated_tests) \
+  $(parallel_tests) \
   $(depmod_tests) \
   $(instspc_tests)
 
-EXTRA_DIST += $(handwritten_tests) $(generated_tests)
-
-generated_tests = $(parallel_tests)
+EXTRA_DIST += $(handwritten_tests)
 
 handwritten_tests = \
 aclocal.test \
@@ -864,6 +848,7 @@ self-check-exit.test \
 self-check-explicit-skips.test \
 self-check-is_newest.test \
 self-check-me.test \
+self-check-reexec.test \
 self-check-report.test \
 self-check-sanity.test \
 self-check-unindent.test \
@@ -1084,9 +1069,8 @@ yflags-var-expand.test
 
 ## Checking the test of tests.
 checked_test_extensions = .test
-expected_list_of_tests = $(handwritten_tests) $(generated_tests)
+expected_list_of_tests = $(handwritten_tests)
 include $(top_srcdir)/CheckListOfTests.am
-maintainer-check-list-of-tests: $(expected_list_of_tests)
 
 # Dependencies valid for each test case.
 $(TEST_LOGS): defs defs-static aclocal-$(APIVERSION) automake-$(APIVERSION)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 840e4f0..875b06e 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -192,10 +192,13 @@ am__test_logs1 = $(TESTS:=.log)
 am__test_logs2 = $(am__test_logs1:.test.log=.log)
 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
        $(TEST_LOG_FLAGS)
-am__test_logs3 = $(am__test_logs2:.instspc.log=.log)
+am__test_logs3 = $(am__test_logs2:.ptest.log=.log)
+PTEST_LOG_COMPILE = $(PTEST_LOG_COMPILER) $(AM_PTEST_LOG_FLAGS) \
+       $(PTEST_LOG_FLAGS)
+am__test_logs4 = $(am__test_logs3:.instspc.log=.log)
 INSTSPC_LOG_COMPILE = $(INSTSPC_LOG_COMPILER) $(AM_INSTSPC_LOG_FLAGS) \
        $(INSTSPC_LOG_FLAGS)
-TEST_LOGS = $(am__test_logs3:.depmod.log=.log)
+TEST_LOGS = $(am__test_logs4:.depmod.log=.log)
 DEPMOD_LOG_COMPILE = $(DEPMOD_LOG_COMPILER) $(AM_DEPMOD_LOG_FLAGS) \
        $(DEPMOD_LOG_FLAGS)
 TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
@@ -250,6 +253,9 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
 am_AUTOHEADER = @am_AUTOHEADER@
+am_AUTOM4TE = @am_AUTOM4TE@
+am_AUTORECONF = @am_AUTORECONF@
+am_AUTOUPDATE = @am_AUTOUPDATE@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -295,24 +301,26 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-MAINTAINERCLEANFILES = $(parallel_tests)
-EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \
-       depmod-tests.sh $(handwritten_tests) $(generated_tests)
-TEST_EXTENSIONS = .test .instspc .depmod
+MAINTAINERCLEANFILES = 
+EXTRA_DIST = ChangeLog-old gen-parallel-tests parallel-tests.sh \
+       instspc-tests.sh depmod-tests.sh $(handwritten_tests)
+TEST_EXTENSIONS = .test .ptest .instspc .depmod
 # Run the tests with the shell detected at configure time.
 TEST_LOG_COMPILER = $(SHELL)
 XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \
        override-conditional-2.test pr8365-remake-timing.test \
        yacc-dist-nobuild-subdir.test txinfo5.test \
        $(instspc_xfail_tests)
-parallel_tests = backcompat5-p.test check-exported-srcdir-p.test \
-       check-subst-prog-p.test check-subst-p.test \
-       check-tests-in-builddir-p.test check-tests_environment-p.test \
-       check-p.test check10-p.test check11-p.test check12-p.test \
-       check2-p.test check3-p.test check4-p.test check5-p.test \
-       check6-p.test check7-p.test check8-p.test color-p.test \
-       color2-p.test comment9-p.test dejagnu-p.test exeext4-p.test \
-       maken3-p.test maken4-p.test posixsubst-tests-p.test
+parallel_tests = backcompat5-p.ptest check-exported-srcdir-p.ptest \
+       check-subst-prog-p.ptest check-subst-p.ptest \
+       check-tests-in-builddir-p.ptest \
+       check-tests_environment-p.ptest check-p.ptest check10-p.ptest \
+       check11-p.ptest check12-p.ptest check2-p.ptest check3-p.ptest \
+       check4-p.ptest check5-p.ptest check6-p.ptest check7-p.ptest \
+       check8-p.ptest color-p.ptest color2-p.ptest comment9-p.ptest \
+       dejagnu-p.ptest exeext4-p.ptest maken3-p.ptest maken4-p.ptest \
+       posixsubst-tests-p.ptest
+PTEST_LOG_COMPILER = $(SHELL) $(srcdir)/parallel-tests.sh
 instspc_tests = build-squote.instspc install-squote.instspc \
        build-dquote.instspc install-dquote.instspc \
        build-bquote.instspc install-bquote.instspc \
@@ -394,11 +402,10 @@ AM_TESTS_ENVIRONMENT = \
 
 TESTS = \
   $(handwritten_tests) \
-  $(generated_tests) \
+  $(parallel_tests) \
   $(depmod_tests) \
   $(instspc_tests)
 
-generated_tests = $(parallel_tests)
 handwritten_tests = \
 aclocal.test \
 aclocal3.test \
@@ -1129,6 +1136,7 @@ self-check-exit.test \
 self-check-explicit-skips.test \
 self-check-is_newest.test \
 self-check-me.test \
+self-check-reexec.test \
 self-check-report.test \
 self-check-sanity.test \
 self-check-unindent.test \
@@ -1347,14 +1355,14 @@ yflags-force-conditional.test \
 yflags-var-expand.test
 
 checked_test_extensions = .test
-expected_list_of_tests = $(handwritten_tests) $(generated_tests)
+expected_list_of_tests = $(handwritten_tests)
 am__tmk = tests-in-makefile-list.tmp
 am__tfs = tests-on-filesystem-list.tmp
 am__tdf = diff-in-tests-lists.tmp
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .depmod .html .instspc .log .test
+.SUFFIXES: .depmod .html .instspc .log .ptest .test
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/parallel-tests.am 
$(srcdir)/instspc-tests.am $(srcdir)/depmod-tests.am 
$(top_srcdir)/CheckListOfTests.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
@@ -1526,6 +1534,8 @@ recheck recheck-html:
        $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) 
TEST_LOGS="'"$$list"'"'
 .test.log:
        @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
+.ptest.log:
+       @p='$<'; $(am__check_pre) $(PTEST_LOG_COMPILE) "$$tst" $(am__check_post)
 .instspc.log:
        @p='$<'; $(am__check_pre) $(INSTSPC_LOG_COMPILE) "$$tst" 
$(am__check_post)
 .depmod.log:
@@ -1710,27 +1720,11 @@ posixsubst-tests-p.log: posixsubst-tests.test
 $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
        $(AM_V_GEN)($(am__cd) $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
 
-$(parallel_tests): Makefile.am
-       $(AM_V_at)rm -f $@ address@hidden
-       $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
-       { echo '#!/bin/sh'; \
-         echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
-         echo; \
-         echo '# Ensure proper definition of $$testsrcdir.'; \
-         echo '. ./defs-static || exit 99'; \
-         echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
-         echo; \
-         echo "# Run the test with Automake's parallel-tests driver enabled."; 
\
-         echo 'parallel_tests=yes'; \
-         echo "# In the spirit of VPATH, we prefer a test in the build tree"; \
-         echo "# over one in the source tree."; \
-         echo "if test -f \"./$$input\"; then"; \
-         echo "  . \"./$$input\""; \
-         echo 'else'; \
-         echo "  . \"\$$testsrcdir/$$input\""; \
-         echo 'fi'; \
-       } > address@hidden
-       $(AM_V_at)chmod a+rx address@hidden && mv -f address@hidden $@
+# All `*-p.ptest' tests work by sourcing the script `parallel-tests.sh'.
+$(parallel_tests:.ptest=.log): parallel-tests.sh
+# This dummy declaration is required to have make actually produce
+# expected log files from the `.ptest.log' suffix rule.
+$(parallel_tests):
 
 $(srcdir)/instspc-tests.am: instspc-tests.sh Makefile.am
        $(AM_V_GEN)($(am__cd) $(srcdir) \
@@ -1800,7 +1794,6 @@ maintainer-check-list-of-tests:
 clean-local: clean-maintcheck-testslist-tmp
 clean-maintcheck-testslist-tmp:
        rm -f $(am__tmk) $(am__tfs) $(am__tdf)
-maintainer-check-list-of-tests: $(expected_list_of_tests)
 
 # Dependencies valid for each test case.
 $(TEST_LOGS): defs defs-static aclocal-$(APIVERSION) automake-$(APIVERSION)
diff --git a/tests/README b/tests/README
index 2db4e22..d74a725 100644
--- a/tests/README
+++ b/tests/README
@@ -228,11 +228,11 @@ Do not
   here.)
 
   Do not override Makefile variables using make arguments, as in e.g.:
-    $MAKE DESTDIR=/foo/bar install
+    $MAKE prefix=/opt install
   This is not portable for recursive targets (targets that call a
-  sub-make may not pass `DESTDIR=/foo/bar' along).  Use the following
+  sub-make may not pass `prefix=/opt' along).  Use the following
   instead:
-    DESTDIR=/foo/bar $MAKE -e install
+    prefix=/opt $MAKE -e install
 
   Do not send a test case without signing a copyright disclaimer.
   See http://sources.redhat.com/automake/contribute.html or
diff --git a/tests/ccnoco.test b/tests/ccnoco.test
index fb22ba7..bcd18fc 100755
--- a/tests/ccnoco.test
+++ b/tests/ccnoco.test
@@ -20,22 +20,12 @@
 required=gcc
 . ./defs || Exit 1
 
-cat > configure.1 << 'END'
-AC_INIT(a.c)
-AM_INIT_AUTOMAKE(nonesuch, 0.23)
+cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
-END
-
-# This one makes sure that $CC can be used after AM_PROG_CC_C_O.
-cat > configure.3 << 'END'
-AC_INIT(a.c)
-AM_INIT_AUTOMAKE(nonesuch, 0.23)
-AC_PROG_CC
-AM_PROG_CC_C_O
-$CC -v > Hi 2>&1 || exit 1
-AC_OUTPUT(Makefile)
+# Make sure that $CC can be used after AM_PROG_CC_C_O.
+$CC -v || exit 1
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -54,16 +44,17 @@ int main ()
 }
 END
 
-cat > Mycomp << 'END'
+cat > Mycomp << END
 #!/bin/sh
 
-case " "$* in
+case " \$* " in
  *\ -c*\ -o* | *\ -o*\ -c*)
     exit 1
     ;;
 esac
 
-exec gcc "$@"
+# Use '$CC', not 'gcc', to honour the compiler chosen by 'tests/defs'.
+exec $CC "\$@"
 END
 
 chmod +x Mycomp
@@ -72,25 +63,25 @@ chmod +x Mycomp
 CFLAGS=
 export CFLAGS
 
-for conf in configure.1 configure.3; do
-   cp $conf configure.in
-
-   $ACLOCAL
-   $AUTOCONF
-   $AUTOMAKE --copy --add-missing
-
-   rm -rf build
-   mkdir build
-   cd build
-
-   # Make sure the compiler doesn't understand `-c -o'
-   CC=`pwd`/../Mycomp
-   export CC
-
-   ../configure
-   $MAKE
-
-   cd ..
+# Make sure the compiler doesn't understand `-c -o'
+CC=`pwd`/Mycomp
+export CC
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --copy --add-missing
+
+for vpath in : false; do
+  if $vpath; then
+    srcdir=..
+    mkdir build
+    cd build
+  else
+    srcdir=.
+  fi
+  $srcdir/configure
+  $MAKE
+  cd $srcdir
 done
 
 :
diff --git a/tests/ccnoco2.test b/tests/ccnoco2.test
index a724448..4c6b22b 100755
--- a/tests/ccnoco2.test
+++ b/tests/ccnoco2.test
@@ -35,7 +35,7 @@ touch a.c
 $ACLOCAL
 $AUTOCONF
 AUTOMAKE_fails --copy --add-missing
-grep 'Makefile.am:2:.*per-target.*AM_PROG_CC_C_O' stderr
+grep '^Makefile\.am:2:.*per-target.*AM_PROG_CC_C_O' stderr
 
 
 cat >Makefile.am <<EOF
@@ -50,4 +50,6 @@ $AUTOMAKE --copy --add-missing
 
 echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am
 AUTOMAKE_fails --copy --add-missing
-grep 'Makefile.am:2:.*subdir.*AM_PROG_CC_C_O' stderr
+grep '^Makefile\.am:2:.*subdir.*AM_PROG_CC_C_O' stderr
+
+:
diff --git a/tests/ccnoco3.test b/tests/ccnoco3.test
index 92ccf79..2a32f6b 100755
--- a/tests/ccnoco3.test
+++ b/tests/ccnoco3.test
@@ -23,6 +23,7 @@ required=gcc
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+$CC --version; $CC -v; # For debugging.
 AC_OUTPUT
 END
 
@@ -43,16 +44,17 @@ int main ()
 }
 END
 
-cat > Mycomp << 'END'
+cat > Mycomp << END
 #!/bin/sh
 
-case " "$* in
+case " \$* " in
  *\ -c*\ -o* | *\ -o*\ -c*)
     exit 1
     ;;
 esac
 
-exec gcc "$@"
+# Use '$CC', not 'gcc', to honour the compiler chosen by 'tests/defs'.
+exec $CC "\$@"
 END
 
 chmod +x Mycomp
@@ -77,4 +79,4 @@ $MAKE 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'mv.*the same file' stderr && Exit 1
 
-Exit 0
+:
diff --git a/tests/cond29.test b/tests/cond29.test
index 222743c..b07a7a9 100755
--- a/tests/cond29.test
+++ b/tests/cond29.test
@@ -16,17 +16,9 @@
 
 # Check that many conditions do not lead to combinatorial explosion.
 # (This is related to PR/352.)
-#
-# On this test, Automake 1.7.x would compute all 2**22 = 4194304
-# possible combinations of conditionals (it would do this five times,
-# to define a01_DEPENDENCIES, a02_DEPENDENCIES, a03_OBJECTS,
-# a04_OBJECTS, and to rewrite bin_PROGRAM), eating all memory, swap,
-# or cpu time it can found.
 
 . ./defs || Exit 1
 
-timeout 10s true || skip_ "timeout command not found"
-
 echo AC_PROG_CC >>configure.in
 
 cat >Makefile.am <<EOF
@@ -35,6 +27,14 @@ a02_LDADD =
 a03_SOURCES =
 EOF
 
+# On this test, Automake 1.7.x would compute all 2**22 = 4194304
+# possible combinations of conditionals (it would do this five times,
+# to define a01_DEPENDENCIES, a02_DEPENDENCIES, a03_OBJECTS,
+# a04_OBJECTS, and to rewrite bin_PROGRAM), eating all memory, swap,
+# or cpu time it can found.
+ulimit -v 20000 || skip_ "no adequate 'ulimit' builtin found"
+(ulimit -v 1; sh -c 'exit 0') && skip_ "no adequate 'ulimit' builtin found"
+
 for i in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22; do
   unindent >>Makefile.am <<EOF
     if C$i
@@ -49,10 +49,6 @@ EOF
 done
 
 $ACLOCAL
-# Be lax w.r.t. the timeout for low-priority processes on heavily
-# loaded systems.
-niceness=`nice || echo 0`
-case $niceness in [0-9]*);; *) niceness=0;; esac
-timeout `expr 60 '+' $niceness '*' 20`s $AUTOMAKE
+$AUTOMAKE
 
 :
diff --git a/tests/defs b/tests/defs
index 5494625..1f3210c 100644
--- a/tests/defs
+++ b/tests/defs
@@ -76,12 +76,6 @@ test -f "$testbuilddir/defs-static" || {
    exit 99
 }
 
-# Ensure we can find ourselves.
-test -f "$0" || {
-   echo "$me: unable to find myself: $0" >&2
-   exit 1
-}
-
 
 ## ------------------------------------ ##
 ##  Ensure we run with a proper shell.  ##
@@ -93,6 +87,11 @@ case ${AM_TESTS_REEXEC-yes} in
   n|no|false|0)
     ;;
   *)
+    # Ensure we can find ourselves.
+    if test ! -f "$0"; then
+      echo "$me: unable to find myself: $0" >&2
+      exit 99
+    fi
     AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
     # Cannot simply do `opts=$-', since the content of $- is not
     # portable among different shells.  So try to propagate only
diff --git a/tests/defs-static.in b/tests/defs-static.in
index 8f64dc6..53d9f93 100644
--- a/tests/defs-static.in
+++ b/tests/defs-static.in
@@ -96,8 +96,10 @@ SHELL='@SHELL@'; export SHELL
 test -z "$PERL" && PERL='@PERL@'
 test -z "$MAKE" && MAKE=make
 test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
+test -z "$AUTOM4TE" && AUTOM4TE="@am_AUTOM4TE@"
+test -z "$AUTORECONF" && AUTORECONF="@am_AUTORECONF@"
 test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
-test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
+test -z "$AUTOUPDATE" && AUTOUPDATE="@am_AUTOUPDATE@"
 test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing
 
 # Use -Werror because this also turns some Perl warnings into error.
diff --git a/tests/gen-parallel-tests b/tests/gen-parallel-tests
index 0c96228..340b0e7 100755
--- a/tests/gen-parallel-tests
+++ b/tests/gen-parallel-tests
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # For each test in the TESTS list in this Makefile.am file, that itself
-# tests features of the TESTS automake interface, generate a sibling
+# tests features of the TESTS automake interface, define a sibling
 # test that does likewise, but with the option `parallel-tests' enabled.
 # Individual tests can prevent the creation of such a sibling by
 # explicitly setting the `$parallel_tests' variable to either "yes" or
@@ -41,7 +41,6 @@ fi
   grep -l '^TESTS ' $tests
   grep -l ' TESTS ' $tests
 } |
-grep -v '.-p\.test' |
 LC_ALL=C sort -u |
 while read tst; do
   if grep '^[^#]*parallel-tests' $tst >/dev/null \
@@ -52,12 +51,12 @@ sed -e 's/\.test$//' |
 {
   echo "## Generated by gen-parallel-tests.  Edit Makefile.am instead of this."
   echo "parallel_tests ="
-  # Since `foo-p.test' sources `foo.test', `foo-p.log' also depends on
+  # Since `foo-p.ptest' sources `foo.test', `foo-p.log' also depends on
   # `foo.test'.
   sed -e '
     h
     s/^/parallel_tests += /
-    s/$/-p.test/
+    s/$/-p.ptest/
     p
     x
     s/.*/&-p.log: &.test/
diff --git a/tests/parallel-tests.sh b/tests/parallel-tests.sh
new file mode 100755
index 0000000..b6bbff3
--- /dev/null
+++ b/tests/parallel-tests.sh
@@ -0,0 +1,52 @@
+#! /bin/sh
+# Copyright (C) 2011 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/>.
+
+# Driver script to run checks the on the `parallel-tests' semantics
+# by wrapping tests that use the generic "Simple Tests" driver.
+
+set -e
+
+fatal_ () { echo "$0: $*" >&2; exit 99; }
+
+# Ensure proper definition of $testsrcdir.
+. ./defs-static || exit 99
+test -n "$testsrcdir" || fatal_ "\$testsrcdir is empty or undefined"
+
+case $#,$1 in
+  0,) fatal_ "missing argument";;
+  1,*-p.ptest) test_name=`expr /"$1" : '.*/\(.*\)-p\.ptest'`;;
+  1,*) fatal_ "invalid argument \`$1'";;
+  *) fatal_ "too many arguments";;
+esac
+
+# Run the test with Automake's parallel-tests driver enabled.
+parallel_tests=yes
+# This is required to have the wrapped test use a proper temporary
+# directory to run into.
+me=$test_name-p
+# In the spirit of VPATH, we prefer a test in the build tree
+# over one in the source tree.
+if test -f "./$test_name.test"; then
+  . "./$test_name.test"
+  exit $?
+elif test -f "$testsrcdir/$test_name.test"; then
+  . "$testsrcdir/$test_name.test"
+  exit $?
+else
+  fatal_ "cannot find wrapped test \`$test_name.test'"
+fi
+
+exit 255 # Not reached.
diff --git a/tests/self-check-cleanup.test b/tests/self-check-cleanup.test
index 17859e9..f9a8658 100755
--- a/tests/self-check-cleanup.test
+++ b/tests/self-check-cleanup.test
@@ -30,6 +30,8 @@ sed "s|^testbuilddir=.*|testbuilddir='`pwd`'|" ../defs-static 
>defs-static
 diff ../defs-static defs-static && Exit 99
 cp ../defs .
 
+AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
+
 have_symlinks=false
 ln -s defs foo && have_symlinks=:
 export have_symlinks # Is used also by spawned shells.
diff --git a/tests/self-check-dir.test b/tests/self-check-dir.test
index ba9fd29..0b4dd4e 100755
--- a/tests/self-check-dir.test
+++ b/tests/self-check-dir.test
@@ -22,6 +22,8 @@
 
 set -ex
 
+AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
+
 this=S_dir
 outcome=:
 pwd
diff --git a/tests/self-check-explicit-skips.test 
b/tests/self-check-explicit-skips.test
index 15bf2d9..d24e0ef 100755
--- a/tests/self-check-explicit-skips.test
+++ b/tests/self-check-explicit-skips.test
@@ -30,6 +30,7 @@ cp ../defs .
 set +e
 
 unset am_explicit_skips stderr_fileno_
+AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
 
 $SHELL -c '. ./defs; (exit 77); exit 77' dummy.test
 test $? -eq 77 || Exit 1
diff --git a/tests/self-check-me.test b/tests/self-check-me.test
index 141857f..8fd2bc0 100755
--- a/tests/self-check-me.test
+++ b/tests/self-check-me.test
@@ -21,6 +21,8 @@
 
 set -ex
 
+AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
+
 $SHELL -c '. ./defs && echo me=$me' foo-bar-.test | grep '^me=foo-bar-$'
 $SHELL -c '. ./defs && echo me=$me' _foo__bar.test | grep '^me=_foo__bar$'
 $SHELL -c '. ./defs && echo me=$me' 012.test | grep '^me=012$'
diff --git a/tests/self-check-reexec.test b/tests/self-check-reexec.test
new file mode 100755
index 0000000..a35c143
--- /dev/null
+++ b/tests/self-check-reexec.test
@@ -0,0 +1,116 @@
+#! /bin/sh
+# Copyright (C) 2011 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/>.
+
+# Sanity check for the automake testsuite.
+# Check that automatic re-execution of test script with the
+# configure-time $SHELL.
+
+. ./defs || Exit 1
+
+# This is not optimal, but it's much better than writing wrapper
+# scripts acting as "fake" shells.
+sh -c ': ${.sh.version}' \
+  && skip_ "sh is a Korn Shell"
+ksh -c 'test -n "${.sh.version}"' || \
+  skip_ "ksh is not a fully-fledged Korn Shell"
+
+cwd=`pwd` || Exit 99
+
+cp ../defs .
+unset AM_TESTS_REEXEC || :
+
+#
+# Check how to default, force or prevent a re-execution.
+#
+
+cat > run-with-ksh.test <<'END'
+#!/bin/false
+. ./defs
+# Subshell required to prevent some shells (e.g., older bash) from
+# only complaining on stderr but then exiting with exit status 0.
+(test -n "${.sh.version}" && echo ${.sh.version})
+END
+
+sed -e "s|^testbuilddir=.*|testbuilddir='$cwd'|" \
+    -e 's|^SHELL=.*$|SHELL=ksh; export SHELL|' \
+    < ../defs-static >defs-static
+
+sh -x run-with-ksh.test
+
+AM_TESTS_REEXEC=''    sh run-with-ksh.test
+AM_TESTS_REEXEC=yes   sh run-with-ksh.test
+AM_TESTS_REEXEC=y     sh run-with-ksh.test
+AM_TESTS_REEXEC=true  sh run-with-ksh.test
+AM_TESTS_REEXEC=1     sh run-with-ksh.test
+AM_TESTS_REEXEC=no    sh run-with-ksh.test && Exit 1
+AM_TESTS_REEXEC=n     sh run-with-ksh.test && Exit 1
+AM_TESTS_REEXEC=false sh run-with-ksh.test && Exit 1
+AM_TESTS_REEXEC=0     sh run-with-ksh.test && Exit 1
+
+#
+# Check message about the re-execution.
+#
+
+cat > dummy.test <<'END'
+#!/bin/sh
+. ./defs
+:
+END
+chmod a+x dummy.test
+
+mkdir sub
+cp dummy.test defs sub
+sed -e "s|^testbuilddir=.*|testbuilddir='$cwd'|" \
+    < ../defs-static > defs-static
+sed -e "s|^testbuilddir=.*|testbuilddir='$cwd/sub'|" \
+    < ../defs-static > sub/defs-static
+
+./dummy.test a b | grep "^dummy: exec $SHELL \\./dummy\\.test a b$"
+
+for am_sh in sh ksh; do
+  $am_sh dummy.test a b c \
+    | grep "^dummy: exec $SHELL dummy\\.test a b c$"
+  $am_sh ./dummy.test a b c \
+    | grep "^dummy: exec $SHELL \\./dummy\\.test a b c$"
+  cd sub
+  $am_sh ../dummy.test a b \
+    | grep "dummy: exec $SHELL \\.\\./dummy\\.test a b$"
+  cd ..
+  $am_sh "$cwd/dummy.test" a -b c- \
+    | grep "^dummy: exec $SHELL $cwd/dummy\\.test a -b c-$"
+  $am_sh sub/dummy.test 1 2 3 4 \
+    | grep "^dummy: exec $SHELL sub/dummy\\.test 1 2 3 4$"
+done
+
+#
+# Check that arguments passed to a test script are preserved by a re-exec.
+#
+
+cat > checkargs.test <<'END'
+. ./defs
+test $# -eq 3 && test x"$1" = x'a' && test x"$2" = x && test x"$3" = x"-e"
+END
+
+$SHELL checkargs.test a '' -e
+$SHELL ./checkargs.test a '' -e
+$SHELL "$cwd/checkargs.test" a '' -e
+cd sub
+$SHELL ../checkargs.test a '' -e
+cd ..
+cp checkargs.test sub
+$SHELL sub/checkargs.test a '' -e
+
+:
diff --git a/tests/self-check-sanity.test b/tests/self-check-sanity.test
index d35432f..3e60a68 100755
--- a/tests/self-check-sanity.test
+++ b/tests/self-check-sanity.test
@@ -27,6 +27,8 @@ show_stderr ()
   sed 's/^/ | /' stderr >&2
 }
 
+AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
+
 if $SHELL -c '. ../defs' dummy.test 2>stderr; then
   show_stderr
   Exit 1
diff --git a/tests/silent-many-generic.test b/tests/silent-many-generic.test
index c81f52c..7d615ac 100755
--- a/tests/silent-many-generic.test
+++ b/tests/silent-many-generic.test
@@ -22,8 +22,7 @@
 # sister test `silent-many-gcc.test', which requires the GNU compilers
 # and forces the use of gcc depmode.
 
-# FIXME: generic Fortran compilers should suffice here
-required='cc c++ gfortran flex yacc'
+required='cc c++ fortran fortran77 flex yacc'
 . ./defs || Exit 1
 
 # Avoids too much code duplication.
diff --git a/tests/silentf77.test b/tests/silentf77.test
index 75d5777..90a8208 100755
--- a/tests/silentf77.test
+++ b/tests/silentf77.test
@@ -17,7 +17,7 @@
 # Check silent-rules mode for Fortran 77.
 # Keep this ins sync with the sister test silentf90.test.
 
-required='gfortran' # FIXME: any working Fortran compiler should be OK!
+required=fortran77
 . ./defs || Exit 1
 
 mkdir sub
diff --git a/tests/silentf90.test b/tests/silentf90.test
index c85f78f..6a56175 100755
--- a/tests/silentf90.test
+++ b/tests/silentf90.test
@@ -17,7 +17,7 @@
 # Check silent-rules mode for Fortran 90.
 # Keep this ins sync with the sister test silentf77.test.
 
-required='gfortran' # FIXME: any working Fortran compiler should be OK!
+required=fortran
 . ./defs || Exit 1
 
 mkdir sub


hooks/post-receive
-- 
GNU Automake



reply via email to

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