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-1216-g31bbce9
Date: Mon, 22 Aug 2011 13:46:14 +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=31bbce9e64392f9366582d71aeef1805b53208e3

The branch, testsuite-work has been updated
       via  31bbce9e64392f9366582d71aeef1805b53208e3 (commit)
       via  82796c70d0a67f9af403fd010add959861c0ba40 (commit)
       via  271343d8ef023b9891d9b06bce5e62268f8b50e5 (commit)
       via  94aa58693d1a6fd09db715524e1785d062f1a252 (commit)
       via  8c4d0f0650486315359a63b2b6a832dcf4986147 (commit)
       via  91a7653997ca147b3242688f056c89840b789a09 (commit)
       via  720f0a2e5ad7e232390e2c590c331773389e8a25 (commit)
       via  b3afcecf956210275843c3e6e2d6f639f48156eb (commit)
       via  c8b66be05a6301e5f82ee7b3b7a87727f5cecd9f (commit)
       via  1410d5c0be4283ebb9aba8b472a4c890263ffff4 (commit)
       via  be241ce3cc4fea3e9c3297221958cc8a358f091b (commit)
       via  081e90a8e51099a7513e77329eb604763f6f4df7 (commit)
       via  51f413e99a4254139b40294bc808d614b755a35b (commit)
       via  fb21ed841b61c61d70ac9c370f53d2cf53231764 (commit)
       via  5c210551131a0fc50d0e1af21843b35df46ffdbf (commit)
       via  35a0689da39d6874464b7940b4e1a6930ca3c448 (commit)
      from  fa03ed7900f304fca5eb5e277a4f70b01dbd73b7 (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 31bbce9e64392f9366582d71aeef1805b53208e3
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 19 13:07:29 2011 +0200

    testsuite: various fixlets and tweakings
    
    * tests/seenc.test: Make grepping of automake stderr stricter.
    Add a trailing `:' command.
    * tests/symlink.test: Likewise.  Also, define `$am_create_testdir'
    to "empty" to avoid bringing in unused auxiliary files (only to
    have to remove them right away), and use proper m4 quoting in
    `configure.in'.
    * tests/vpath.test: Make grepping of generated `Makefile.in'
    slightly stricter.  Prefer trailing `:' over trailing `Exit 0'.
    * tests/suffix6c.test: Unset OBJEXT to avoid interferences from
    the environment.
    * tests/suffix12.test: Do not whitespace-indent `##' comments
    when they are embedded in a makefile rule: having them indented
    is not part of the Automake API, and might cause failures with
    e.g., Tru64 make.
    * tests/syntax.test: Simplify the `Makefile.am' to ensure that
    automake doesn't fail for the wrong reasons.  Make grepping of
    automake stderr slightly stricter.
    * tests/test-harness-vpath-rewrite.test: Remove useless variable
    definition from `Makefile.am'.
    * tests/test-driver-custom-multitest.test: Fix typo in comments.
    * tests/self-check-me.tap: Fix minor typo in test description.
    * tests/vars3.test: Make grepping of automake stderr stricter
    and safer.
    * tests/version6.test: Add sanity check, verifying that the
    version number extracted from `automake --version' output seems
    legit.
    * tests/auxdir2.test: Renamed ...
    * tests/auxdir-compauted.tap: ... to this, and converted to the
    use of TAP.
    * tests/auxdir4.test: Renamed ...
    * tests/auxdir-unportable.tap: ... to this, and converted to the
    use of TAP.
    * tests/auxdir3.test: Renamed ...
    * tests/auxdir-misplaced.test: ... to this.
    * tests/auxdir5.test: Renamed ...
    * tests/auxdir-nonexistent.test: ... to this.
    * tests/auxdir9.test: Renamed ...
    * tests/auxdir-autodetect.test: ... to this.
    * tests/Makefile.am (TESTS): Update.
    (XFAIL_TESTS): Remove `auxdir2.test'.

commit 82796c70d0a67f9af403fd010add959861c0ba40
Merge: fa03ed7 271343d
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 19 10:21:01 2011 +0200

    Merge branch 'test-protocols' into testsuite-work
    
    * test-protocols:
      testsuite: fix some redundant autotools calls in tests on TAP
      * THANKS (Daniel Richard G.): Update e-mail address.
      java: avoid compilation errors when CLASSPATH is empty
      parallel-tests: no more spurious successes for FreeBSD make
      tap: improve granularity for tests on problematic TAP messages
      tap: correctly handle string "0" in TAP messages
      tap: a minor simplification in the perl TAP driver
      parallel-tests: fix help screen for test driver scripts
      tap: add a dummy TAP driver script implemented in shell + awk
      testsuite: refactor tests on TAP support in view of future changes
      fix: regenerate tests/Makefile.in
      hacking: we now require autoconf 2.68

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

Summary of changes:
 ChangeLog                                          |  183 ++++++++++++++++++++
 HACKING                                            |    4 +-
 NEWS                                               |    4 +-
 THANKS                                             |    2 +-
 doc/automake.texi                                  |   12 +-
 lib/Automake/tests/Makefile.in                     |    2 +-
 lib/Makefile.am                                    |   25 ++-
 lib/Makefile.in                                    |   25 ++-
 lib/am/check.am                                    |    9 +-
 lib/am/java.am                                     |    2 +-
 lib/{tap-driver => tap-driver.pl}                  |   39 +++--
 lib/{test-driver => tap-driver.sh}                 |   80 ++++-----
 lib/test-driver                                    |    4 +-
 tests/Makefile.am                                  |   21 ++-
 tests/Makefile.in                                  |   42 +++--
 tests/{auxdir9.test => auxdir-autodetect.test}     |    0
 tests/{auxdir2.test => auxdir-computed.tap}        |    8 +-
 tests/{auxdir3.test => auxdir-misplaced.test}      |    0
 tests/{auxdir5.test => auxdir-nonexistent.test}    |    0
 tests/{auxdir4.test => auxdir-unportable.tap}      |   22 ++-
 ...-srcdir.test => check-concurrency-bug9245.test} |   49 +++---
 tests/defs                                         |   24 +++
 tests/java-empty-classpath.test                    |   90 ++++++++++
 tests/seenc.test                                   |    8 +-
 tests/self-check-me.tap                            |    2 +-
 tests/suffix12.test                                |    2 +-
 tests/suffix6c.test                                |    2 +
 tests/symlink.test                                 |   14 +-
 tests/syntax.test                                  |    4 +-
 tests/tap-bad-prog.tap                             |    6 +-
 tests/tap-basic.test                               |    8 +-
 tests/tap-common-setup.test                        |    6 +-
 tests/tap-deps.test                                |    6 -
 tests/tap-diagnostic-custom.test                   |    6 +-
 tests/tap-doc.test                                 |    6 +-
 tests/tap-doc2.test                                |    7 +-
 tests/tap-empty-diagnostic.test                    |    6 -
 tests/tap-escape-directive.test                    |    6 -
 tests/tap-fancy2.test                              |    6 -
 tests/tap-merge-stdout-stderr.test                 |    3 +-
 tests/tap-more.test                                |    6 +-
 tests/tap-more2.test                               |    6 +-
 ...lan-and-bad-exit.test => tap-msg0-bailout.test} |   25 +--
 ...ap-not-ok-skip.test => tap-msg0-directive.test} |   20 ++-
 tests/{tap-message-0.test => tap-msg0-misc.test}   |   68 +++++---
 ...scape-directive.test => tap-msg0-planskip.test} |   24 +--
 tests/{tap-message-0.test => tap-msg0-result.test} |   37 ++--
 tests/tap-no-spurious.test                         |    6 -
 tests/tap-out-of-order.test                        |    7 -
 tests/tap-recheck.test                             |    6 +-
 tests/tap-setup.sh                                 |    3 +-
 tests/tap-summary-aux.sh                           |    6 +-
 tests/test-driver-custom-multitest.test            |    2 +-
 tests/test-harness-vpath-rewrite.test              |    1 -
 tests/vars3.test                                   |   38 ++---
 tests/version6.test                                |    8 +
 tests/vpath.test                                   |    5 +-
 57 files changed, 662 insertions(+), 351 deletions(-)
 rename lib/{tap-driver => tap-driver.pl} (92%)
 copy lib/{test-driver => tap-driver.sh} (60%)
 rename tests/{auxdir9.test => auxdir-autodetect.test} (100%)
 rename tests/{auxdir2.test => auxdir-computed.tap} (86%)
 rename tests/{auxdir3.test => auxdir-misplaced.test} (100%)
 rename tests/{auxdir5.test => auxdir-nonexistent.test} (100%)
 rename tests/{auxdir4.test => auxdir-unportable.tap} (73%)
 copy tests/{check-exported-srcdir.test => check-concurrency-bug9245.test} (59%)
 create mode 100755 tests/java-empty-classpath.test
 copy tests/{tap-missing-plan-and-bad-exit.test => tap-msg0-bailout.test} (67%)
 copy tests/{tap-not-ok-skip.test => tap-msg0-directive.test} (73%)
 copy tests/{tap-message-0.test => tap-msg0-misc.test} (51%)
 copy tests/{tap-escape-directive.test => tap-msg0-planskip.test} (68%)
 rename tests/{tap-message-0.test => tap-msg0-result.test} (62%)

diff --git a/ChangeLog b/ChangeLog
index eeb8374..fb6bc35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,186 @@
+2011-08-19  Stefano Lattarini  <address@hidden>
+
+       testsuite: various fixlets and tweakings
+       * tests/seenc.test: Make grepping of automake stderr stricter.
+       Add a trailing `:' command.
+       * tests/symlink.test: Likewise.  Also, define `$am_create_testdir'
+       to "empty" to avoid bringing in unused auxiliary files (only to
+       have to remove them right away), and use proper m4 quoting in
+       `configure.in'.
+       * tests/vpath.test: Make grepping of generated `Makefile.in'
+       slightly stricter.  Prefer trailing `:' over trailing `Exit 0'.
+       * tests/suffix6c.test: Unset OBJEXT to avoid interferences from
+       the environment.
+       * tests/suffix12.test: Do not whitespace-indent `##' comments
+       when they are embedded in a makefile rule: having them indented
+       is not part of the Automake API, and might cause failures with
+       e.g., Tru64 make.
+       * tests/syntax.test: Simplify the `Makefile.am' to ensure that
+       automake doesn't fail for the wrong reasons.  Make grepping of
+       automake stderr slightly stricter.
+       * tests/test-harness-vpath-rewrite.test: Remove useless variable
+       definition from `Makefile.am'.
+       * tests/test-driver-custom-multitest.test: Fix typo in comments.
+       * tests/self-check-me.tap: Fix minor typo in test description.
+       * tests/vars3.test: Make grepping of automake stderr stricter
+       and safer.
+       * tests/version6.test: Add sanity check, verifying that the
+       version number extracted from `automake --version' output seems
+       legit.
+       * tests/auxdir2.test: Renamed ...
+       * tests/auxdir-compauted.tap: ... to this, and converted to the
+       use of TAP.
+       * tests/auxdir4.test: Renamed ...
+       * tests/auxdir-unportable.tap: ... to this, and converted to the
+       use of TAP.
+       * tests/auxdir3.test: Renamed ...
+       * tests/auxdir-misplaced.test: ... to this.
+       * tests/auxdir5.test: Renamed ...
+       * tests/auxdir-nonexistent.test: ... to this.
+       * tests/auxdir9.test: Renamed ...
+       * tests/auxdir-autodetect.test: ... to this.
+       * tests/Makefile.am (TESTS): Update.
+       (XFAIL_TESTS): Remove `auxdir2.test'.
+
+2011-08-19  Stefano Lattarini  <address@hidden>
+
+       testsuite: fix some redundant autotools calls in tests on TAP
+       * tests/tap-deps.test: Do not call autotools and configure; there
+       is no need to, since this script sources `tap-setup.sh'.
+       * tests/tap-empty-diagnostic.test: Likewise.
+       * tests/tap-escape-directive.test: Likewise.
+       * tests/tap-fancy2.test: Likewise.
+       * tests/tap-no-spurious.test: Likewise.
+       * tests/tap-out-of-order.test: Likewise.
+
+2011-08-17  Stefano Lattarini  <address@hidden>
+
+       * THANKS (Daniel Richard G.): Update e-mail address.
+
+2011-08-16  Daniel Richard G. <address@hidden>  (tiny change)
+           Stefano Lattarini  <address@hidden>
+
+       java: avoid compilation errors when CLASSPATH is empty
+       * lib/am/java.am (CLASSPATH_ENV): When redefining `$CLASSPATH',
+       do not append an empty component in case the previous value of
+       CLASSPATH is empty or unset.
+       * tests/java-empty-classpath.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       Fixes automake bug#9306.
+
+2011-08-16  Stefano Lattarini  <address@hidden>
+
+       parallel-tests: no more spurious successes for FreeBSD make
+       Work around a bug of FreeBSD make bug that was causing the
+       automake-generated "check" target to complete with success
+       even if some tests failed; this happened only when FreeBSD
+       make was run in concurrent mode (as in, e.g., "make -j2
+       check").  The bug is not present in NetBSD make.
+       This change fixes automake bug#9245:
+        <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9245>
+       See also FreeBSD PR bin/159730:
+        <http://www.freebsd.org/cgi/query-pr.cgi?pr=159730>
+       * lib/am/check.am [%?PARALLEL_TESTS%] $(TEST_SUITE_LOG): Use a
+       more "safe" (and apparently redundant) idiom to exit with error,
+       so that the non-zero exit status is picked up also by FreeBSD
+       make when it's running in concurrent mode.
+       * NEWS: Update.
+       * tests/check-concurrency-bug9245.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-08-11  Stefano Lattarini  <address@hidden>
+
+       hacking: we now require autoconf 2.68
+       * HACKING ("Working in git"): Use autoconf and autom4te 2.68,
+       not 2.67, in the examples.
+
+2011-08-17  Stefano Lattarini  <address@hidden>
+
+       tap: improve granularity for tests on problematic TAP messages
+       * tests/tap-message-0.test: Break up into ...
+       * tests/tap-msg0-result.test, tests/tap-msg0-directive.test,
+       tests/tap-msg0-planskip.test, tests/tap-msg0-misc.test,
+       tests/tap-msg0-bailout.test: ... these new tests, and extend
+       a little.
+       * tests/Makefile.am (tap_with_common_setup_tests): Update.
+
+2011-08-17  Stefano Lattarini  <address@hidden>
+
+       tap: correctly handle string "0" in TAP messages
+       * lib/tap-driver.pl (is_null_string): New function, can be used
+       to determine whether a given string variable is empty or undefined.
+       Useful to avoid pitfalls like:
+         if ($message) { print "$message\n"; }
+       which wouldn't print anything if $message is the literal "0".
+       (handle_tap_test, handle_tap_plan, handle_tap_bailout): Use it,
+       to avoid missing messages composed only by a literal "0" in TAP
+       result descriptions and in skip, todo and bailout explanations.
+       * tests/tap-message-0.test: Enhance.
+       * tests/Makefile.am (XFAIL_TESTS): Remove it, it passes now.
+
+2011-08-17  Stefano Lattarini  <address@hidden>
+
+       tap: a minor simplification in the perl TAP driver
+       * lib/tap-driver.pl: The `--disable-hard-errors' option is a
+       no-op, so just ignore it and its argument.
+
+2011-08-17  Stefano Lattarini  <address@hidden>
+
+       parallel-tests: fix help screen for test driver scripts
+       * lib/tap-driver.pl ($USAGE): The `--trs-file' option is mandatory
+       too.
+       * lib/tap-driver.sh (print_usage): Likewise.
+       * lib/test-driver (print_usage): Likewise.
+       ($scriptversion): Update.
+
+2011-08-17  Stefano Lattarini  <address@hidden>
+
+       tap: add a dummy TAP driver script implemented in shell + awk
+       The user can also now decide which implementation of the TAP driver
+       to use in the testsuite by defining the `$am_tap_implementation'
+       variable to either "perl" or "shell".  Future enhancements will
+       allow the testsuite to automatically run the test scripts on TAP
+       support with both the TAP driver implementations, to improve
+       coverage.
+       * tests/defs (fetch_tap_driver): Honor the `$am_tap_implementation'
+       variable to decide which implementation of the TAP driver to fetch.
+       ($am_tap_implementation): Default to "perl".
+       * tests/tap-common-setup.test: Do not fetch the TAP driver, the
+       code in tap-setup.sh does that already (and respecting runtime
+       overriding of `$am_tap_implementation').
+       * lib/tap-driver: Renamed ...
+       * lib/tap-driver.pl: ... to this, and ...
+       ($ME): ... adjusted this.
+       * doc/automake.texi: Adjust to the renaming.
+       * tests/Makefile.am (TAP_LOG_DRIVER): Likewise.
+       * tests/tap-doc2.test: Likewise.
+       * lib/tap-driver.sh: New script, still mostly dummy.
+       * lib/Makefile.am (dist_script_DATA): Update, and since we are at
+       it, rewrite it to make it easier to add new entries in the future.
+
+2011-08-17  Stefano Lattarini  <address@hidden>
+
+       testsuite: refactor tests on TAP support in view of future changes
+       * tests/defs (fetch_tap_driver): New subroutine; it fetches the
+       automake-provided TAP driver from the `lib/' directory into the
+       current directory, and edits its shebang line so that it will be
+       run with the perl interpreter determined at configure time.
+       * tests/tap-setup.sh: Use it.
+       * tests/tap-common-setup.test: There's no need to AC_SUBST `PERL'
+       anymore, nor to use it in the Makefile to run the TAP driver.
+       Also, use the `fetch_tap_driver' function instead of copying the
+       `tap-driver' auxiliary script directly.
+       * tests/tap-bad-prog.tap: Likewise.
+       * tests/tap-diagnostic-custom.test: Likewise.
+       * tests/tap-doc.test: Likewise.
+       * tests/tap-merge-stdout-stderr.test: Likewise.
+       * tests/tap-more.test: Likewise.
+       * tests/tap-more2.test: Likewise.
+       * tests/tap-recheck.test: Likewise.
+       * tests/tap-summary-aux.sh: Likewise.
+       * tests/tap-basic.test: Likewise, and fix a grammaro in comments
+       since we are at it.
+
 2011-08-17  Stefano Lattarini  <address@hidden>
 
        test defs: fix typo in comments
diff --git a/HACKING b/HACKING
index 231e3fc..1cc43fe 100644
--- a/HACKING
+++ b/HACKING
@@ -102,8 +102,8 @@
   not installed as "autoconf", pass it explicitly (along with the
   accompanying "autom4te") when calling `bootstrap' and `configure'.
   For example:
-    $ AUTOCONF=autoconf2.67 AUTOM4TE=autom4te2.67 ./bootstrap
-    $ ./configure AUTOCONF=autoconf2.67 AUTOM4TE=autom4te2.67
+    $ AUTOCONF=autoconf2.68 AUTOM4TE=autom4te2.68 ./bootstrap
+    $ ./configure AUTOCONF=autoconf2.68 AUTOM4TE=autom4te2.68
 
 * Dependent files aclocal.m4, configure and Makefile.in in all
   directories should be up to date in the git repository, so that
diff --git a/NEWS b/NEWS
index 1c2f102..f316bb0 100644
--- a/NEWS
+++ b/NEWS
@@ -136,7 +136,9 @@ Bugs fixed in 1.11a:
 * Bugs introduced by 1.11:
 
   - The `parallel-tests' test driver works around a GNU make 3.80 bug with
-    trailing white space in the test list (`TESTS = foo $(EMPTY)').
+    trailing white space in the test list (`TESTS = foo $(EMPTY)'), and
+    does not report spurious successes when used with concurrent FreeBSD
+    make (e.g., "make check -j3").
 
   - The `silent-rules' option now also silences all compile rules if dependency
     tracking is disabled.  Also, when `silent-rules' is not used, the output 
from
diff --git a/THANKS b/THANKS
index 6f39e7d..63afbed 100644
--- a/THANKS
+++ b/THANKS
@@ -67,7 +67,7 @@ Dalibor Topic         address@hidden
 danbp                  address@hidden
 Daniel Jacobowitz      address@hidden
 Daniel Kahn Gillmor    address@hidden
-Daniel Richard G.      address@hidden
+Daniel Richard G.      address@hidden
 Debarshi Ray           address@hidden
 Dave Brolley           address@hidden
 Dave Korn              address@hidden
diff --git a/doc/automake.texi b/doc/automake.texi
index 6be5c2d..ca54999 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -9632,16 +9632,16 @@ use TAP in their testsuite.
 Currently, the TAP driver that comes with Automake requires a perl
 interpreter to work, and requires various by-hand steps on the
 developer's part (this should be fixed in future Automake versions).
-You'll have grab the @file{tap-driver} script from the Automake
+You'll have grab the @file{tap-driver.pl} script from the Automake
 distribution by hand, copy it in your source tree, add code to
 @file{configure.ac} to search a perl interpreter and to define the
 @code{$(PERL)} variable accordingly, and use the Automake support
 for third-party test drivers to instruct the harness to use the
address@hidden to run your TAP-producing tests.  See the example
address@hidden to run your TAP-producing tests.  See the example
 below for clarification.
 
 Apart from the options common to all the Automake test drivers
-(@pxref{Command-line arguments for test drivers}), the @file{tap-driver}
+(@pxref{Command-line arguments for test drivers}), the @file{tap-driver.pl}
 supports the following options, whose names are chosen for enhanced
 compatibility with the @command{prove} utility.
 
@@ -9691,14 +9691,14 @@ AC_INIT([GNU Try Tap], [1.0], [bug-automake@@gnu.org])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
 AC_CONFIG_FILES([Makefile])
-AC_REQUIRE_AUX_FILE([tap-driver])
+AC_REQUIRE_AUX_FILE([tap-driver.pl])
 AC_PATH_PROG([PERL], [perl])
 test -n "$PERL" || AC_MSG_ERROR([perl not found])
 $PERL -MTAP::Parser -e 1 || AC_MSG_ERROR([TAP::Parser not found])
 AC_OUTPUT
 
 % @kbd{cat Makefile.am}
-TEST_LOG_DRIVER = $(PERL) $(srcdir)/build-aux/tap-driver
+TEST_LOG_DRIVER = $(PERL) $(srcdir)/build-aux/tap-driver.pl
 TESTS = foo.test bar.test baz.test
 EXTRA_DIST = $(TESTS)
 
@@ -9726,7 +9726,7 @@ echo ok 1
 # Exit with error, even if all the test case has been successful.
 exit 7
 
-% @kbd{cp @var{PREFIX}/share/address@hidden/tap-driver .}
+% @kbd{cp @var{PREFIX}/share/address@hidden/tap-driver.pl .}
 % @kbd{autoreconf -vi && ./configure && make check}
 ...
 PASS: foo.test 1 - Swallows fly
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 558f807..89ec5b2 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -479,7 +479,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          fi;                                                           \
          echo "$$col$$br$$std";                                        \
        fi;                                                             \
-       $$success
+       $$success || exit 1
 
 # Run all the tests.
 check-TESTS:
diff --git a/lib/Makefile.am b/lib/Makefile.am
index a9467f1..bc234ee 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2,8 +2,8 @@
 
 ## Makefile for Automake lib.
 
-# Copyright (C) 2001, 2003, 2004, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2003, 2004, 2009, 2010, 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
@@ -27,9 +27,24 @@ dist_pkgvdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c 
ansi2knr.1 \
 ## _SCRIPTS, then the program transform will be applied, which is not
 ## what we want.  So we make them executable by hand.
 scriptdir = $(pkgvdatadir)
-dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
-  mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile \
-  symlink-tree ar-lib test-driver tap-driver
+dist_script_DATA = \
+  config.guess \
+  config.sub \
+  install-sh \
+  mdate-sh \
+  missing \
+  mkinstalldirs \
+  elisp-comp \
+  ylwrap \
+  acinstall \
+  depcomp \
+  compile \
+  py-compile \
+  symlink-tree \
+  ar-lib \
+  test-driver \
+  tap-driver.sh \
+  tap-driver.pl
 
 EXTRA_DIST = gnupload
 
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 5bf597e..769446f 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -15,8 +15,8 @@
 
 @SET_MAKE@
 
-# Copyright (C) 2001, 2003, 2004, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2003, 2004, 2009, 2010, 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
@@ -245,9 +245,24 @@ dist_pkgvdata_DATA = COPYING INSTALL texinfo.tex 
ansi2knr.c ansi2knr.1 \
   config-ml.in
 
 scriptdir = $(pkgvdatadir)
-dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
-  mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile \
-  symlink-tree ar-lib test-driver tap-driver
+dist_script_DATA = \
+  config.guess \
+  config.sub \
+  install-sh \
+  mdate-sh \
+  missing \
+  mkinstalldirs \
+  elisp-comp \
+  ylwrap \
+  acinstall \
+  depcomp \
+  compile \
+  py-compile \
+  symlink-tree \
+  ar-lib \
+  test-driver \
+  tap-driver.sh \
+  tap-driver.pl
 
 EXTRA_DIST = gnupload
 all: all-recursive
diff --git a/lib/am/check.am b/lib/am/check.am
index 27388df..0628c86 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -295,8 +295,13 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          fi;                                                           \
          echo "$$col$$br$$std";                                        \
        fi;                                                             \
-## Be sure to exit with the proper exit status.
-       $$success
+## 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)
 
diff --git a/lib/am/java.am b/lib/am/java.am
index d6eb455..604df22 100644
--- a/lib/am/java.am
+++ b/lib/am/java.am
@@ -21,7 +21,7 @@
 ## ---------- ##
 
 JAVAC = javac
-CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH
+CLASSPATH_ENV = 
CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT)$${CLASSPATH:+":$$CLASSPATH"}
 JAVAROOT = $(top_builddir)
 
 class%DIR%.stamp: $(%DIR%_JAVA)
diff --git a/lib/tap-driver b/lib/tap-driver.pl
similarity index 92%
rename from lib/tap-driver
rename to lib/tap-driver.pl
index 95fb78c..7043815 100755
--- a/lib/tap-driver
+++ b/lib/tap-driver.pl
@@ -11,7 +11,7 @@ use strict;
 use Getopt::Long ();
 use TAP::Parser;
 
-my $ME = "tap-driver";
+my $ME = "tap-driver.pl";
 
 my $USAGE = <<'END';
 Usage:
@@ -20,7 +20,7 @@ Usage:
              [--enable-hard-errors={yes|no}] [--ignore-exit]
              [--diagnostic-string=STRING] [--merge|--no-merge]
              [--comments|--no-comments] [--] TEST-COMMAND
-The `--test-name' and `--log-file' options are mandatory.
+The `--test-name', `--log-file' and `--trs-file' options are mandatory.
 END
 
 my $HELP = "$ME: TAP-aware test driver for Automake testsuite harness." .
@@ -63,7 +63,6 @@ my $plan_seen = NO_PLAN;
 my %cfg = (
   "color-tests" => 0,
   "expect-failure" => 0,
-  "enable-hard-errors" => 1,
   "merge" => 0,
   "comments" => 0,
   "ignore-exit" => 0,
@@ -82,7 +81,7 @@ Getopt::Long::GetOptions (
     'trs-file=s' => \$trs_file,
     'color-tests=s'  => \&bool_opt,
     'expect-failure=s'  => \&bool_opt,
-    'enable-hard-errors=s' => \&bool_opt,
+    'enable-hard-errors=s' => sub {}, # No-op.
     'diagnostic-string=s' => \$diag_string,
     'comments' => sub { $cfg{"comments"} = 1; },
     'no-comments' => sub { $cfg{"comments"} = 0; },
@@ -107,6 +106,7 @@ sub get_test_results ();
 sub handle_tap_bailout ($);
 sub handle_tap_plan ($);
 sub handle_tap_test ($);
+sub is_null_string ($);
 sub main (@);
 sub must_recheck ();
 sub report ($;$);
@@ -137,6 +137,16 @@ sub bool_opt ($$)
     }
 }
 
+# If the given string is undefined or empty, return true, otherwise
+# return false.  This function is useful to avoid pitfalls like:
+#   if ($message) { print "$message\n"; }
+# which wouldn't print anything if $message is the literal "0".
+sub is_null_string ($)
+{
+  my $str = shift;
+  return ! (defined $str and length $str);
+}
+
 # Convert a boolean to a "yes"/"no" string.
 sub yn ($)
 {
@@ -330,10 +340,9 @@ sub handle_tap_test ($)
   my $test_result = stringify_test_result $test;
   my $string = $test->number;
   
-  if (my $description = $test->description)
-    {
-      $string .= " $description";
-    }
+  my $description = $test->description;
+  $string .= " $description"
+    unless is_null_string $description;
 
   if ($plan_seen == LATE_PLAN)
     {
@@ -350,10 +359,9 @@ sub handle_tap_test ($)
   elsif (my $directive = $test->directive)
     {
       $string .= " # $directive";
-      if (my $explanation = $test->explanation)
-        {
-          $string .= " $explanation";
-        }
+      my $explanation = $test->explanation;
+      $string .= " $explanation"
+        unless is_null_string $explanation;
     }
 
   report $test_result, $string;
@@ -382,8 +390,8 @@ sub handle_tap_plan ($)
   # of SKIP result.
   if ($plan->directive && $testno == 0)
     {
-      my $explanation = $plan->explanation ?
-                        "- " . $plan->explanation : undef;
+      my $explanation = is_null_string ($plan->explanation) ?
+                        undef : "- " . $plan->explanation;
       report "SKIP", $explanation;
     }
 }
@@ -392,7 +400,8 @@ sub handle_tap_bailout ($)
 {
   my ($bailout, $msg) = ($_[0], "Bail out!");
   $bailed_out = 1;
-  $msg .= " " . $bailout->explanation if $bailout->explanation;
+  $msg .= " " . $bailout->explanation
+    unless is_null_string $bailout->explanation;
   testsuite_error $msg;
 }
 
diff --git a/lib/test-driver b/lib/tap-driver.sh
similarity index 60%
copy from lib/test-driver
copy to lib/tap-driver.sh
index 8522a49..322e3c4 100755
--- a/lib/test-driver
+++ b/lib/tap-driver.sh
@@ -1,8 +1,4 @@
 #! /bin/sh
-# test-driver - basic driver script for the `parallel-tests' mode.
-
-scriptversion=2011-08-04.22; # UTC
-
 # Copyright (C) 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -27,10 +23,18 @@ scriptversion=2011-08-04.22; # UTC
 # bugs to <address@hidden> or send patches to
 # <address@hidden>.
 
+scriptversion=2011-08-17.14; # UTC
+
 # Make unconditional expansion of undefined variables an error.  This
 # helps a lot in preventing typo-related bugs.
 set -u
 
+fatal ()
+{
+  echo "$0: fatal: $*" >&2
+  exit 1
+}
+
 usage_error ()
 {
   echo "$0: $*" >&2
@@ -42,39 +46,56 @@ print_usage ()
 {
   cat <<END
 Usage:
-  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
-              [--expect-failure={yes|no}] [--color-tests={yes|no}]
-              [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
-The \`--test-name' and \`--log-file' options are mandatory.
+  tap-driver --test-name=NAME --log-file=PATH --trs-file=PATH
+             [--expect-failure={yes|no}] [--color-tests={yes|no}]
+             [--enable-hard-errors={yes|no}] [--ignore-exit]
+             [--diagnostic-string=STRING] [--merge|--no-merge]
+             [--comments|--no-comments] [--] TEST-COMMAND
+The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory.
 END
 }
 
 # TODO: better error handling in option parsing (in particular, ensure
 # TODO: $log_file, $trs_file and $test_name are defined).
 test_name= # Used for reporting.
-log_file=  # Where to save the output of the test script.
+log_file=  # Where to save the result and output of the test script.
 trs_file=  # Where to save the metadata of the test run.
 expect_failure=no
 color_tests=no
-enable_hard_errors=yes
+merge=no
+ignore_exit=no
+comments=no
+diag_string='#'
 while test $# -gt 0; do
   case $1 in
   --help) print_usage; exit $?;;
-  --version) echo "test-driver $scriptversion"; exit $?;;
+  --version) echo "tap-driver $scriptversion"; exit $?;;
   --test-name) test_name=$2; shift;;
   --log-file) log_file=$2; shift;;
   --trs-file) trs_file=$2; shift;;
   --color-tests) color_tests=$2; shift;;
   --expect-failure) expect_failure=$2; shift;;
-  --enable-hard-errors) enable_hard_errors=$2; shift;;
+  --enable-hard-errors) shift;; # No-op.
+  --merge) merge=yes;;
+  --no-merge) merge=no;;
+  --ignore-exit) ignore_exit=yes;;
+  --comments) comments=yes;;
+  --no-comments) comments=no;;
+  --diag-string) diag_string=$2; shift;;
   --) shift; break;;
   -*) usage_error "invalid option: '$1'";;
   esac
   shift
 done
 
+test $# -gt 0 || usage_error "missing test command"
+
+case $expect_failure in
+  yes) expect_failure=1;;
+    *) expect_failure=0;;
+esac
+
 if test $color_tests = yes; then
-  # Keep this in sync with `lib/am/check.am:$(am__tty_colors)'.
   red='' # Red.
   grn='' # Green.
   lgn='' # Light green.
@@ -85,36 +106,11 @@ else
   red= grn= lgn= blu= mgn= std=
 fi
 
-do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
-trap "st=129; $do_exit" 1
-trap "st=130; $do_exit" 2
-trap "st=141; $do_exit" 13
-trap "st=143; $do_exit" 15
-
-# Test script is run here.
-"$@" >$log_file 2>&1
-estatus=$?
-if test $enable_hard_errors = no && test $estatus -eq 99; then
-  estatus=1
-fi
-
-case $estatus:$expect_failure in
-  0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
-  0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
-  77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
-  99:*)  col=$mgn res=ERROR recheck=yes gcopy=yes;;
-  *:yes) col=$lgn res=XFAIL recheck=no  gcopy=yes;;
-  *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
-esac
-
-# Report outcome to console.
-echo "${col}${res}${std}: $test_name"
+# TODO: test script is run here.
+# "$@" | [our magic awk script]
 
-# Register the test result, and other relevant metadata.
-echo ":test-result: $res" > $trs_file
-echo ":global-test-result: $res" >> $trs_file
-echo ":recheck: $recheck" >> $trs_file
-echo ":copy-in-global-log: $gcopy" >> $trs_file
+echo "$0: still to be implemented, sorry" >&2
+exit 255
 
 # Local Variables:
 # mode: shell-script
diff --git a/lib/test-driver b/lib/test-driver
index 8522a49..b89107c 100755
--- a/lib/test-driver
+++ b/lib/test-driver
@@ -1,7 +1,7 @@
 #! /bin/sh
 # test-driver - basic driver script for the `parallel-tests' mode.
 
-scriptversion=2011-08-04.22; # UTC
+scriptversion=2011-08-17.14; # UTC
 
 # Copyright (C) 2011 Free Software Foundation, Inc.
 #
@@ -45,7 +45,7 @@ Usage:
   test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
               [--expect-failure={yes|no}] [--color-tests={yes|no}]
               [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
-The \`--test-name' and \`--log-file' options are mandatory.
+The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory.
 END
 }
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0db204e..337f8c6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -23,7 +23,7 @@ TEST_EXTENSIONS = .test .tap
 TEST_LOG_COMPILER = $(LOG_COMPILER)
 TAP_LOG_COMPILER = $(LOG_COMPILER)
 
-TAP_LOG_DRIVER = $(PERL) $(top_srcdir)/lib/tap-driver
+TAP_LOG_DRIVER = $(PERL) $(top_srcdir)/lib/tap-driver.pl
 TAP_LOG_DRIVER_FLAGS = --merge --comments
 ## Avoid spurious TAP diagnostic.  We use an awful indirection with a
 ## shell command substitution here, since the string needs to contain
@@ -40,13 +40,11 @@ EXTRA_DIST = ChangeLog-old
 
 XFAIL_TESTS = \
 all.test \
-auxdir2.test \
 cond17.test \
 gcj6.test \
 override-conditional-2.test \
 pr8365-remake-timing.test \
 yacc-dist-nobuild-subdir.test \
-tap-message-0.test \
 txinfo5.test
 
 
@@ -193,14 +191,14 @@ autohdr4.test \
 autohdrdry.test \
 automake-cmdline.tap \
 auxdir.test \
-auxdir2.test \
-auxdir3.test \
-auxdir4.test \
-auxdir5.test \
 auxdir6.test \
 auxdir7.test \
 auxdir8.test \
-auxdir9.test \
+auxdir-autodetect.test \
+auxdir-computed.tap \
+auxdir-misplaced.test \
+auxdir-nonexistent.test \
+auxdir-unportable.tap \
 backcompat.test \
 backcompat2.test \
 backcompat3.test \
@@ -246,6 +244,7 @@ check-exported-srcdir.test \
 check-fd-redirect.test \
 check-tests-in-builddir.test \
 check-no-test-driver.test \
+check-concurrency-bug9245.test \
 checkall.test \
 clean.test \
 clean2.test \
@@ -1172,9 +1171,13 @@ tap-global-log.test \
 tap-global-result.test \
 tap-html.test \
 tap-log.test \
+tap-msg0-result.test \
+tap-msg0-directive.test \
+tap-msg0-planskip.test \
+tap-msg0-bailout.test \
+tap-msg0-misc.test \
 tap-merge-stdout-stderr.test \
 tap-no-merge-stdout-stderr.test \
-tap-message-0.test \
 tap-no-disable-hard-error.test \
 tap-no-spurious-summary.test \
 tap-no-spurious.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 5f50e7d..beada3f 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -298,7 +298,7 @@ LOG_COMPILER = $(SHELL)
 TEST_EXTENSIONS = .test .tap .ptest .shtst
 TEST_LOG_COMPILER = $(LOG_COMPILER)
 TAP_LOG_COMPILER = $(LOG_COMPILER)
-TAP_LOG_DRIVER = $(PERL) $(top_srcdir)/lib/tap-driver
+TAP_LOG_DRIVER = $(PERL) $(top_srcdir)/lib/tap-driver.pl
 TAP_LOG_DRIVER_FLAGS = --merge --comments --diagnostic-string `printf \
        '\043%%\043\n'`
 MAINTAINERCLEANFILES = 
@@ -309,24 +309,22 @@ EXTRA_DIST = ChangeLog-old gen-parallel-tests 
parallel-tests.sh \
        extract-testsuite-summary tap-setup.sh tap-summary-aux.sh
 XFAIL_TESTS = \
 all.test \
-auxdir2.test \
 cond17.test \
 gcj6.test \
 override-conditional-2.test \
 pr8365-remake-timing.test \
 yacc-dist-nobuild-subdir.test \
-tap-message-0.test \
 txinfo5.test
 
-parallel_tests = backcompat5-p.ptest check-exported-srcdir-p.ptest \
-       check-fd-redirect-p.ptest check-subst-prog-p.ptest \
-       check-subst-p.ptest check-tests-in-builddir-p.ptest \
-       check-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 \
-       tests-environment-p.ptest
+parallel_tests = backcompat5-p.ptest check-concurrency-bug9245-p.ptest \
+       check-exported-srcdir-p.ptest check-fd-redirect-p.ptest \
+       check-subst-prog-p.ptest check-subst-p.ptest \
+       check-tests-in-builddir-p.ptest check-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 tests-environment-p.ptest
 PTEST_LOG_COMPILER = $(LOG_COMPILER) $(srcdir)/parallel-tests.sh
 config_shell_tests = ar-lib-w.shtst compile-w.shtst compile2-w.shtst \
        compile3-w.shtst compile4-w.shtst compile5-w.shtst \
@@ -436,14 +434,14 @@ autohdr4.test \
 autohdrdry.test \
 automake-cmdline.tap \
 auxdir.test \
-auxdir2.test \
-auxdir3.test \
-auxdir4.test \
-auxdir5.test \
 auxdir6.test \
 auxdir7.test \
 auxdir8.test \
-auxdir9.test \
+auxdir-autodetect.test \
+auxdir-computed.tap \
+auxdir-misplaced.test \
+auxdir-nonexistent.test \
+auxdir-unportable.tap \
 backcompat.test \
 backcompat2.test \
 backcompat3.test \
@@ -489,6 +487,7 @@ check-exported-srcdir.test \
 check-fd-redirect.test \
 check-tests-in-builddir.test \
 check-no-test-driver.test \
+check-concurrency-bug9245.test \
 checkall.test \
 clean.test \
 clean2.test \
@@ -1399,9 +1398,13 @@ tap-global-log.test \
 tap-global-result.test \
 tap-html.test \
 tap-log.test \
+tap-msg0-result.test \
+tap-msg0-directive.test \
+tap-msg0-planskip.test \
+tap-msg0-bailout.test \
+tap-msg0-misc.test \
 tap-merge-stdout-stderr.test \
 tap-no-merge-stdout-stderr.test \
-tap-message-0.test \
 tap-no-disable-hard-error.test \
 tap-no-spurious-summary.test \
 tap-no-spurious.test \
@@ -1637,7 +1640,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          fi;                                                           \
          echo "$$col$$br$$std";                                        \
        fi;                                                             \
-       $$success
+       $$success || exit 1
 
 # Run all the tests.
 check-TESTS:
@@ -1859,6 +1862,7 @@ uninstall-am:
        uninstall uninstall-am
 
 backcompat5-p.log: backcompat5.test
+check-concurrency-bug9245-p.log: check-concurrency-bug9245.test
 check-exported-srcdir-p.log: check-exported-srcdir.test
 check-fd-redirect-p.log: check-fd-redirect.test
 check-subst-prog-p.log: check-subst-prog.test
diff --git a/tests/auxdir9.test b/tests/auxdir-autodetect.test
similarity index 100%
rename from tests/auxdir9.test
rename to tests/auxdir-autodetect.test
diff --git a/tests/auxdir2.test b/tests/auxdir-computed.tap
similarity index 86%
rename from tests/auxdir2.test
rename to tests/auxdir-computed.tap
index c915a6b..007eebc 100755
--- a/tests/auxdir2.test
+++ b/tests/auxdir-computed.tap
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+plan_ 3
+
 cat > configure.in <<END
 AC_INIT([$me], [1.0])
 AC_CONFIG_AUX_DIR([\$foo])
@@ -28,10 +30,10 @@ END
 
 : > Makefile.am
 
-$ACLOCAL
+command_ok_ "aclocal" $ACLOCAL
 # Both these two invocations are meant.
 # They exercise both code paths concerning auxiliary files.
-$AUTOMAKE -a
-$AUTOMAKE
+command_ok_ "automake -a" -D TODO -r "long-standing limitation" $AUTOMAKE -a
+command_ok_ "automake"    -D TODO -r "long-standing limitation" $AUTOMAKE
 
 :
diff --git a/tests/auxdir3.test b/tests/auxdir-misplaced.test
similarity index 100%
rename from tests/auxdir3.test
rename to tests/auxdir-misplaced.test
diff --git a/tests/auxdir5.test b/tests/auxdir-nonexistent.test
similarity index 100%
rename from tests/auxdir5.test
rename to tests/auxdir-nonexistent.test
diff --git a/tests/auxdir4.test b/tests/auxdir-unportable.tap
similarity index 73%
rename from tests/auxdir4.test
rename to tests/auxdir-unportable.tap
index 09bde4a..2eba8be 100755
--- a/tests/auxdir4.test
+++ b/tests/auxdir-unportable.tap
@@ -18,6 +18,8 @@
 
 . ./defs || Exit 1
 
+plan_ 4
+
 cat >configure.in <<END
 AC_INIT([$me], [1.0])
 AC_CONFIG_AUX_DIR([aux])
@@ -27,13 +29,23 @@ END
 
 : > Makefile.am
 
-$ACLOCAL
-AUTOMAKE_fails
-grep '^configure\.in:2:.*aux.*W32' stderr
+am_warn_unportable_auxdir ()
+{
+  details=$1
+  AUTOMAKE_fails
+  command_ok_ \
+    "warn about $details unportable auxdir name" \
+    grep '^configure\.in:2:.*aux.*W32' stderr
+}
+
+$ACLOCAL || fatal_ "aclocal failed"
+
+am_warn_unportable_auxdir "non-existent"
 
 if mkdir aux; then
-  AUTOMAKE_fails
-  grep '^configure\.in:2:.*aux.*W32' stderr
+  am_warn_unportable_auxdir "existent"
+else
+  skip_row_ 2 -r "cannot create directory named 'aux'"
 fi
 
 :
diff --git a/tests/check-exported-srcdir.test 
b/tests/check-concurrency-bug9245.test
similarity index 59%
copy from tests/check-exported-srcdir.test
copy to tests/check-concurrency-bug9245.test
index 6d17320..e5dd153 100755
--- a/tests/check-exported-srcdir.test
+++ b/tests/check-concurrency-bug9245.test
@@ -14,50 +14,49 @@
 # 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 testsuite driver (either with or without the
-# parallel-tests option enabled) exports the `srcdir' value in the
-# environment of the tests.  This is documented in the manual.
+# Look for a bug where FreeBSD make in concurrent mode reported success
+# even when the Automake-generated parallel testsuite harness failed.
+# See automake bug#9245.
 
 . ./defs || Exit 1
 
-show_info ()
-{
-  if test x"$parallel_tests" = x"yes"; then
-     cat foo.log
-     cat test-suite.log
-  else
-     :
-  fi
-}
-
-mkdir SrcDir
-mv [!S]* SrcDir
-mkdir BuildDir
-cd SrcDir
-
 cat >> configure.in << 'END'
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TESTS = foo.test
+TESTS = foo.test bar.test
 END
 
 cat > foo.test <<'END'
 #!/bin/sh
-echo "foo.test: srcdir='$srcdir'"
-test x"$srcdir" = x"../SrcDir"
+exit 1
 END
 chmod a+x foo.test
 
+cp foo.test bar.test
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-cd ../BuildDir
-../SrcDir/configure
+./configure
+
+# Some make implementations don't grok the `-j' option.
+$MAKE -j1 || Exit 77
 
-$MAKE check || { show_info; Exit 1; }
-show_info
+for j in '' -j1 -j2; do
+  $MAKE $j check && Exit 1
+  TESTS=foo.test $MAKE $j -e check && Exit 1
+  if test x"$parallel_tests" = x"yes"; then
+    $MAKE $j recheck && Exit 1
+    TEST_LOGS=foo.log $MAKE $j -e check && Exit 1
+    rm -f test-suite.log
+    $MAKE $j test-suite.log && Exit 1
+    test -f test-suite.log || Exit 1
+  else
+    : # For shells with buggy 'set -e'.
+  fi
+done
 
 :
diff --git a/tests/defs b/tests/defs
index 87c9c82..e4e1840 100644
--- a/tests/defs
+++ b/tests/defs
@@ -487,6 +487,30 @@ xsi_shell_code='
     && eval '\''test $(( 1 + 1 )) -eq 2 \
     && test "${#_lt_dummy}" -eq 5'\'
 
+# fetch_tap_driver
+# ----------------
+# Fetch the Automake-provided TAP driver from the `lib/' directory into
+# the current directory, and edit its shebang line so that it will be
+# run with the perl interpreter determined at configure time.
+fetch_tap_driver ()
+{
+  # TODO: we should devise a way to make the shell TAP driver tested also
+  # TODO: with /bin/sh, for better coverage.
+  case $am_tap_implementation in
+    perl)
+      sed "1s|#!.*|#! $PERL -w|" "$top_testsrcdir"/lib/tap-driver.pl ;;
+    shell)
+      sed "1s|#!.*|#! $SHELL|" "$top_testsrcdir"/lib/tap-driver.sh ;;
+    *)
+      fatal_ "invalid \$am_tap_implementation '$am_tap_implementation'" ;;
+  esac > tap-driver \
+    && chmod a+x tap-driver \
+    || framework_failure_ "couldn't fetch $am_tap_implementation TAP driver"
+  sed 10q tap-driver # For debugging.
+}
+# The shell/awk implementation of the TAP driver is still mostly dummy, so
+# use the perl implementation by default for the moment.
+am_tap_implementation=${am_tap_implementation-perl}
 
 ## ----------------------------------------------------------- ##
 ##  Checks for required tools, and additional setups (if any)  ##
diff --git a/tests/java-empty-classpath.test b/tests/java-empty-classpath.test
new file mode 100755
index 0000000..230bb7c
--- /dev/null
+++ b/tests/java-empty-classpath.test
@@ -0,0 +1,90 @@
+#! /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/>.
+
+# Java compilation works also when CLASSPATH is unset or empty at
+# compilation time.  See automake bug#9306.
+
+required=javac
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_CONFIG_SRCDIR([org/gnu/bug/Library.java])
+AC_CONFIG_FILES([
+    org/Makefile
+    org/gnu/Makefile
+    org/gnu/bug/Makefile
+])
+AC_OUTPUT
+END
+
+mkdir org org/gnu org/gnu/bug
+cat > Makefile.am <<END
+CLEANFILES = *.class
+SUBDIRS = org
+END
+echo SUBDIRS = gnu > org/Makefile.am 
+echo SUBDIRS = bug > org/gnu/Makefile.am 
+cat > org/gnu/bug/Makefile.am <<'END'
+JAVAROOT = ../../..
+dist_noinst_JAVA = Library.java Application.java
+END
+
+cat > org/gnu/bug/Library.java <<'END'
+package org.gnu.bug;
+public class Library
+{
+    public Library ()
+    {
+      // Nothing to do.
+    }
+    public static void doSomethingUseful (String arg)
+    {
+      System.out.println (arg);
+    }
+}
+END
+
+cat > org/gnu/bug/Application.java <<'END'
+import org.gnu.bug.*;
+public class Application
+{
+    public static void main (String args[])
+    {
+        Library lib = new Library ();
+        lib.doSomethingUseful ("PLUGH");
+    }
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+unset CLASSPATH || :
+$MAKE
+$MAKE clean
+
+CLASSPATH=''; export CLASSPATH
+$MAKE
+$MAKE clean
+
+unset CLASSPATH || :
+$MAKE distcheck
+
+:
diff --git a/tests/seenc.test b/tests/seenc.test
index ea51cf5..de8bcc4 100755
--- a/tests/seenc.test
+++ b/tests/seenc.test
@@ -36,5 +36,9 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-$FGREP CC stderr
-$FGREP CXX stderr
+grep ' C source.*CC.* undefined' stderr
+grep 'define .*CC.* add .*AC_PROG_CC' stderr
+grep ' C++ source.*CXX.* undefined' stderr
+grep 'define .*CXX.* add .*AC_PROG_CXX' stderr
+
+:
diff --git a/tests/self-check-me.tap b/tests/self-check-me.tap
index d7f61d6..f681f06 100755
--- a/tests/self-check-me.tap
+++ b/tests/self-check-me.tap
@@ -51,7 +51,7 @@ command_ok_ "override of \$me before ./defs causes no error" \
 r='ok'
 printf '%s\n' "$s" | grep '^me=foo\.test$' || r='not ok'
 printf '%s\n' "$s" | grep 'me=bad'         && r='not ok'
-result_ "$r" "override of \$me before defs is honored"
+result_ "$r" "override of \$me before ./defs is honored"
 unset r
 
 # Overriding $me after sourcing ./defs-static should work.
diff --git a/tests/suffix12.test b/tests/suffix12.test
index f583e36..430a350 100755
--- a/tests/suffix12.test
+++ b/tests/suffix12.test
@@ -31,7 +31,7 @@ AUTOMAKE_OPTIONS = subdir-objects
 SUFFIXES = .baz .o
 # We fake here:
 .baz.o:
-       ## Account for VPATH issues on weaker make implementations.
+## Account for VPATH issues on weaker make implementations.
        cp `test -f '$<' || echo $(srcdir)/`$< $@
 
 bin_PROGRAMS = foo
diff --git a/tests/suffix6c.test b/tests/suffix6c.test
index 149717d..7d1d7b5 100755
--- a/tests/suffix6c.test
+++ b/tests/suffix6c.test
@@ -31,6 +31,8 @@ AC_SUBST([OBJEXT])
 AC_OUTPUT
 END
 
+unset OBJEXT || :
+
 cat > Makefile.am << 'END'
 SUFFIXES = .zoo .o .obj address@hidden@
 
diff --git a/tests/symlink.test b/tests/symlink.test
index 5ecd4ab..790c566 100755
--- a/tests/symlink.test
+++ b/tests/symlink.test
@@ -18,20 +18,24 @@
 # Make sure we get an error if symlink creation fails.
 # Reported by Joerg-Martin Schwarz.
 
+am_create_testdir=empty
 . ./defs || Exit 1
 
-rm -f install-sh
-rm -f mkinstalldirs
-
 : > Makefile.am
 
 cat > configure.in << 'END'
 AC_INIT([symlink], [1.0])
-AC_CONFIG_AUX_DIR(sub)
+AC_CONFIG_AUX_DIR([subdir])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 END
 
 $ACLOCAL
 AUTOMAKE_fails --add-missing
-grep 'error while making link' stderr
+
+grep '^configure\.in:3: .*missing.*error while making link' stderr
+grep '^configure\.in:3: .*install-sh.*error while making link' stderr
+
+test `$FGREP -c 'error while making link' stderr` -eq 2
+
+:
diff --git a/tests/syntax.test b/tests/syntax.test
index ba9249e..7834136 100755
--- a/tests/syntax.test
+++ b/tests/syntax.test
@@ -22,11 +22,11 @@
 cat > Makefile.am << 'END'
 foo = q \
 
-lib_LTLIBRARIES = foo.la
+bar = z
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'Makefile\.am:2:.*blank line' stderr
+grep '^Makefile\.am:2:.*blank line follow.* trailing backslash' stderr
 
 :
diff --git a/tests/tap-bad-prog.tap b/tests/tap-bad-prog.tap
index 8ba153f..1ced399 100755
--- a/tests/tap-bad-prog.tap
+++ b/tests/tap-bad-prog.tap
@@ -23,16 +23,14 @@ parallel_tests=yes
 
 plan_ 5
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
+fetch_tap_driver
 
 cat >> configure.in <<END
-AC_SUBST([PERL], ['$PERL'])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEST_LOG_DRIVER = $(PERL) $(srcdir)/tap-driver
+TEST_LOG_DRIVER = $(srcdir)/tap-driver
 TESTS = none.test noread.test noexec.test
 none.test:
 END
diff --git a/tests/tap-basic.test b/tests/tap-basic.test
index 26a749d..dde65f2 100755
--- a/tests/tap-basic.test
+++ b/tests/tap-basic.test
@@ -27,16 +27,14 @@
 parallel_tests=yes
 . ./defs || Exit 1
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
+fetch_tap_driver
 
 cat >> configure.in <<END
-AC_SUBST([PERL], ['$PERL'])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEST_LOG_DRIVER = $(PERL) $(srcdir)/tap-driver
+TEST_LOG_DRIVER = $(srcdir)/tap-driver
 ## Defining LOG_COMPILER should work and not intefere with the
 ## tap-driver script.
 TEST_LOG_COMPILER = cat
@@ -145,7 +143,7 @@ test `$FGREP -c ': bail.test' stdout` -eq 1
 $FGREP 'success.test' stdout && Exit 1
 
 # Override TEST_LOGS from the command line, making it point to a test
-# (ok.test) that have to be generated at make time.
+# (ok.test) that has to be generated at make time.
 
 rm -f *.log *.test
 
diff --git a/tests/tap-common-setup.test b/tests/tap-common-setup.test
index de8ff2c..92ae3c4 100755
--- a/tests/tap-common-setup.test
+++ b/tests/tap-common-setup.test
@@ -19,16 +19,12 @@
 parallel_tests=yes
 . ./defs || Exit 1
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
-
 cat >> configure.in << END
-AC_SUBST([PERL], ['$PERL'])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEST_LOG_DRIVER = $(PERL) $(srcdir)/tap-driver
+TEST_LOG_DRIVER = $(srcdir)/tap-driver
 TEST_LOG_COMPILER = cat
 TESTS = all.test
 END
diff --git a/tests/tap-deps.test b/tests/tap-deps.test
index b86d235..2f9459d 100755
--- a/tests/tap-deps.test
+++ b/tests/tap-deps.test
@@ -61,12 +61,6 @@ END
 
 chmod a+x *.test
 
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-
 $MAKE check >stdout || { cat stdout; Exit 1; }
 cat stdout
 
diff --git a/tests/tap-diagnostic-custom.test b/tests/tap-diagnostic-custom.test
index d965229..88c859c 100755
--- a/tests/tap-diagnostic-custom.test
+++ b/tests/tap-diagnostic-custom.test
@@ -21,16 +21,14 @@
 parallel_tests=yes
 . ./defs || Exit 1
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
+fetch_tap_driver
 
 cat >> configure.in <<END
-AC_SUBST([PERL], ['$PERL'])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-my_log_driver = $(PERL) $(srcdir)/tap-driver
+my_log_driver = $(srcdir)/tap-driver
 my_log_compiler = cat
 TEST_EXTENSIONS =
 TESTS =
diff --git a/tests/tap-doc.test b/tests/tap-doc.test
index 2920d4e..8ccd30f 100755
--- a/tests/tap-doc.test
+++ b/tests/tap-doc.test
@@ -20,19 +20,17 @@
 parallel_tests=yes
 . ./defs || Exit 1
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
+fetch_tap_driver
 
 cat >> configure.in <<END
 AC_PROG_CC
-AC_SUBST([PERL], ['$PERL'])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 TESTS = foo.sh zardoz.tap bar.sh mu.tap
 TEST_EXTENSIONS = .sh .tap
-TAP_LOG_DRIVER = $(PERL) $(srcdir)/tap-driver
+TAP_LOG_DRIVER = $(srcdir)/tap-driver
 END
 
 cat > foo.sh <<'END'
diff --git a/tests/tap-doc2.test b/tests/tap-doc2.test
index 45d09ca..468bb1c 100755
--- a/tests/tap-doc2.test
+++ b/tests/tap-doc2.test
@@ -23,7 +23,7 @@ parallel_tests=yes
 . ./defs || Exit 1
 
 cat > Makefile.am <<'END'
-TEST_LOG_DRIVER = $(PERL) $(srcdir)/build-aux/tap-driver
+TEST_LOG_DRIVER = $(PERL) $(srcdir)/build-aux/tap-driver.pl
 TESTS = foo.test bar.test baz.test
 EXTRA_DIST = $(TESTS)
 END
@@ -33,7 +33,7 @@ AC_INIT([GNU Try Tap], [1.0], address@hidden)
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
 AC_CONFIG_FILES([Makefile])
-AC_REQUIRE_AUX_FILE([tap-driver])
+AC_REQUIRE_AUX_FILE([tap-driver.pl])
 AC_PATH_PROG([PERL], [perl])
 test -n "$PERL" || AC_MSG_ERROR([perl not found])
 $PERL -MTAP::Parser -e 1 || AC_MSG_ERROR([TAP::Parser not found])
@@ -70,7 +70,8 @@ END
 chmod a+x *.test
 
 mkdir build-aux
-cp "$top_testsrcdir"/lib/tap-driver build-aux
+cp "$top_testsrcdir"/lib/tap-driver.pl build-aux \
+  || framework_failure_ "fetching the perl TAP driver"
 
 (export AUTOMAKE ACLOCAL AUTOCONF && $AUTORECONF -vi) || Exit 1
 
diff --git a/tests/tap-empty-diagnostic.test b/tests/tap-empty-diagnostic.test
index 2dcc880..6bcb8ce 100755
--- a/tests/tap-empty-diagnostic.test
+++ b/tests/tap-empty-diagnostic.test
@@ -31,12 +31,6 @@ ok 1$
 #   ${tab} $tab${tab}$
 END
 
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-
 $MAKE check >stdout || { cat stdout; Exit 1; }
 cat stdout
 
diff --git a/tests/tap-escape-directive.test b/tests/tap-escape-directive.test
index 2f8cb73..dc03197 100755
--- a/tests/tap-escape-directive.test
+++ b/tests/tap-escape-directive.test
@@ -28,12 +28,6 @@ ok \# TODO
 ok \# SKIP
 END
 
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-
 $MAKE check >stdout || { cat stdout; Exit 1; }
 cat stdout
 
diff --git a/tests/tap-fancy2.test b/tests/tap-fancy2.test
index ddd64ea..36e0f29 100755
--- a/tests/tap-fancy2.test
+++ b/tests/tap-fancy2.test
@@ -126,12 +126,6 @@ total=`expr $total + 3`
 # And add the test plan!
 echo 1..$total >> all.test
 
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-
 $MAKE check >stdout && { cat stdout; Exit 1; }
 cat stdout
 
diff --git a/tests/tap-merge-stdout-stderr.test 
b/tests/tap-merge-stdout-stderr.test
index 787ad51..4da9f38 100755
--- a/tests/tap-merge-stdout-stderr.test
+++ b/tests/tap-merge-stdout-stderr.test
@@ -21,8 +21,7 @@
 parallel_tests=yes
 . ./defs || Exit 1
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
+fetch_tap_driver
 
 cat > Makefile.am << 'END'
 AM_TEST_LOG_DRIVER_FLAGS = --comments --merge
diff --git a/tests/tap-more.test b/tests/tap-more.test
index 7d0bf86..375aa00 100755
--- a/tests/tap-more.test
+++ b/tests/tap-more.test
@@ -27,17 +27,15 @@
 parallel_tests=yes
 . ./defs || Exit 1
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
+fetch_tap_driver
 
 cat >> configure.in <<END
-AC_SUBST([PERL], ['$PERL'])
 AC_SUBST([AM_TEST_LOG_DRIVER_FLAGS], ['--comments'])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEST_LOG_DRIVER = $(PERL) $(srcdir)/tap-driver
+TEST_LOG_DRIVER = $(srcdir)/tap-driver
 TESTS = 1.test 2.test 3.test
 EXTRA_DIST = $(TESTS) tap-driver
 END
diff --git a/tests/tap-more2.test b/tests/tap-more2.test
index 810f9b8..f6f1ca1 100755
--- a/tests/tap-more2.test
+++ b/tests/tap-more2.test
@@ -23,19 +23,17 @@ required='cc native'
 parallel_tests=yes
 . ./defs || Exit 1
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
+fetch_tap_driver
 
 cat >> configure.in <<END
 AC_PROG_CC
-AC_SUBST([PERL], ['$PERL'])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 TEST_EXTENSIONS = .sh .tap
 
-tap_driver = $(PERL) $(srcdir)/tap-driver
+tap_driver = $(srcdir)/tap-driver
 
 LOG_DRIVER = $(tap_driver)
 SH_LOG_DRIVER = $(tap_driver)
diff --git a/tests/tap-missing-plan-and-bad-exit.test 
b/tests/tap-msg0-bailout.test
similarity index 67%
copy from tests/tap-missing-plan-and-bad-exit.test
copy to tests/tap-msg0-bailout.test
index 48c6fcc..6aa6d60 100755
--- a/tests/tap-missing-plan-and-bad-exit.test
+++ b/tests/tap-msg0-bailout.test
@@ -15,29 +15,24 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # TAP support:
-#  - if a test script exits with non-zero status before printing the TAP
-#    plan, then the driver reports both "missing plan" and "exited with
-#    non-zero status" errors.
+#  - literal strings "0" and "0.0" as a test description in the message
+#    of a "plan with skip" TAP plan
+# generally true!
 
 parallel_tests=yes
 . ./defs || Exit 1
 
-cat > foo.test <<END
-#!/bin/sh
-exit 123
-END
-
-echo TESTS = foo.test > Makefile.am
-
-chmod a+x foo.test
-
 . "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
+echo 'Bail out! 0' > a.test
+echo 'Bail out! 0.0' > b.test
+
+TESTS='a.test b.test' $MAKE -e check >stdout && { cat stdout; Exit 1; }
 cat stdout
+
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=2
 
-grep '^ERROR: foo\.test - exited with status 123$' stdout
-grep '^ERROR: foo\.test - missing test plan$' stdout
+grep '^ERROR: a.test - Bail out! 0$' stdout
+grep '^ERROR: b.test - Bail out! 0\.0$' stdout
 
 :
diff --git a/tests/tap-not-ok-skip.test b/tests/tap-msg0-directive.test
similarity index 73%
copy from tests/tap-not-ok-skip.test
copy to tests/tap-msg0-directive.test
index f154d23..6ec63f7 100755
--- a/tests/tap-not-ok-skip.test
+++ b/tests/tap-msg0-directive.test
@@ -15,25 +15,27 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # TAP support:
-#  - a "not ok # SKIP" line should count as a failure, for consistency
-#    with the prove(1) utility.
+#  - literal string "0" as a TODO or SKIP message
 
 parallel_tests=yes
 . ./defs || Exit 1
 
 . "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
 
-cat > all.test <<'END'
-1..4
-not ok # SKIP
-not ok 2 # SKIP
-not ok - foo # SKIP
-not ok 4 - bar # SKIP
+cat > all.test << 'END'
+1..3
+ok 1 # TODO 0
+not ok 2 # TODO 0
+ok 3 # SKIP 0
 END
 
 $MAKE check >stdout && { cat stdout; Exit 1; }
 cat stdout
 
-count_test_results total=4 pass=0 fail=4 skip=0 xpass=0 xfail=0 error=0
+count_test_results total=3 pass=0 fail=0 xpass=1 xfail=1 skip=1 error=0
+
+grep '^XPASS: all\.test 1 # TODO 0$' stdout
+grep '^XFAIL: all\.test 2 # TODO 0$' stdout
+grep '^SKIP: all\.test 3 # SKIP 0$' stdout
 
 :
diff --git a/tests/tap-message-0.test b/tests/tap-msg0-misc.test
similarity index 51%
copy from tests/tap-message-0.test
copy to tests/tap-msg0-misc.test
index bce333f..c9399bf 100755
--- a/tests/tap-message-0.test
+++ b/tests/tap-msg0-misc.test
@@ -15,10 +15,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # TAP support:
-#  - having "0" as a test description (or TODO or SKIP message) should
-#    be supported
-# Note that a bug in some versions of TAP::Parser causes this not to be
-# generally true!
+#  - literal "0" and "0.0" in a test description and a TODO/SKIP message
+#    at the same time
 
 parallel_tests=yes
 . ./defs || Exit 1
@@ -26,35 +24,53 @@ parallel_tests=yes
 . "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
 
 cat > all.test << 'END'
-1..10
+1..14
+
 ok 1 0
-ok - 0
-not ok 3 0 # TODO
-not ok - 0 # TODO
-ok 5 0 # SKIP
-ok - 0 # SKIP
-not ok 7 # TODO 0
-ok 8 # SKIP 0
-not ok 9 0 # TODO 0
-ok 10 0 # SKIP 0
+ok 2 0.0
+
+ok 3 0   # TODO 0
+ok 4 0.0 # TODO 0
+ok 5 0   # TODO 0.0
+ok 6 0.0 # TODO 0.0
+
+not ok 7 0   # TODO 0
+not ok 8 0.0 # TODO 0
+not ok 9 0   # TODO 0.0
+not ok 10 0.0 # TODO 0.0
+
+ok 11 0   # SKIP 0
+ok 12 0.0 # SKIP 0
+ok 13 0   # SKIP 0.0
+ok 14 0.0 # SKIP 0.0
+
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; Exit 1; }
 cat stdout
 
-count_test_results total=10 pass=2 fail=0 xpass=0 xfail=4 skip=4 error=0
+count_test_results total=14 pass=2 fail=0 xpass=4 xfail=4 skip=4 error=0
+
+sed '/^ *$/d' > exp << 'END'
 
-cat > exp << 'END'
 PASS: all.test 1 0
-PASS: all.test 2 - 0
-XFAIL: all.test 3 0 # TODO
-XFAIL: all.test 4 - 0 # TODO
-SKIP: all.test 5 0 # SKIP
-SKIP: all.test 6 - 0 # SKIP
-XFAIL: all.test 7 # TODO 0
-SKIP: all.test 8 # SKIP 0
-XFAIL: all.test 9 0 # TODO 0
-SKIP: all.test 10 0 # SKIP 0
+PASS: all.test 2 0.0
+
+XPASS: all.test 3 0 # TODO 0
+XPASS: all.test 4 0.0 # TODO 0
+XPASS: all.test 5 0 # TODO 0.0
+XPASS: all.test 6 0.0 # TODO 0.0
+
+XFAIL: all.test 7 0 # TODO 0
+XFAIL: all.test 8 0.0 # TODO 0
+XFAIL: all.test 9 0 # TODO 0.0
+XFAIL: all.test 10 0.0 # TODO 0.0
+
+SKIP: all.test 11 0 # SKIP 0
+SKIP: all.test 12 0.0 # SKIP 0
+SKIP: all.test 13 0 # SKIP 0.0
+SKIP: all.test 14 0.0 # SKIP 0.0
+
 END
 
 $FGREP ': all.test' stdout > got
diff --git a/tests/tap-escape-directive.test b/tests/tap-msg0-planskip.test
similarity index 68%
copy from tests/tap-escape-directive.test
copy to tests/tap-msg0-planskip.test
index 2f8cb73..b8c3d6c 100755
--- a/tests/tap-escape-directive.test
+++ b/tests/tap-msg0-planskip.test
@@ -15,31 +15,23 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # TAP support:
-#  - "escape" TODO and SKIP directives (by escaping the "#" character)
+#  - literal strings "0" and "0.0" as the reason of the skip in a "TAP
+#    plan with skip" (i.e., "1..0 # SKIP ...").
 
 parallel_tests=yes
 . ./defs || Exit 1
 
 . "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
 
-cat > all.test <<'END'
-1..2
-ok \# TODO
-ok \# SKIP
-END
+echo '1..0 # SKIP 0' > a.test
+echo '1..0 # SKIP 0.0' > b.test
 
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-
-$MAKE check >stdout || { cat stdout; Exit 1; }
+TESTS='a.test b.test' $MAKE -e check >stdout || { cat stdout; Exit 1; }
 cat stdout
 
-count_test_results total=2 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=0
+count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=0
 
-grep '^PASS: all\.test 1 .*TODO' stdout
-grep '^PASS: all\.test 2 .*SKIP' stdout
+grep '^SKIP: a.test - 0$' stdout
+grep '^SKIP: b.test - 0\.0$' stdout
 
 :
diff --git a/tests/tap-message-0.test b/tests/tap-msg0-result.test
similarity index 62%
rename from tests/tap-message-0.test
rename to tests/tap-msg0-result.test
index bce333f..86259e5 100755
--- a/tests/tap-message-0.test
+++ b/tests/tap-msg0-result.test
@@ -15,10 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # TAP support:
-#  - having "0" as a test description (or TODO or SKIP message) should
-#    be supported
-# Note that a bug in some versions of TAP::Parser causes this not to be
-# generally true!
+#  - the string "0" as a test description
 
 parallel_tests=yes
 . ./defs || Exit 1
@@ -29,32 +26,32 @@ cat > all.test << 'END'
 1..10
 ok 1 0
 ok - 0
-not ok 3 0 # TODO
+not ok 3 0
+not ok - 0
+ok 5 0 # TODO
+ok - 0 # TODO
+not ok 7 0 # TODO
 not ok - 0 # TODO
-ok 5 0 # SKIP
+ok 9 0 # SKIP
 ok - 0 # SKIP
-not ok 7 # TODO 0
-ok 8 # SKIP 0
-not ok 9 0 # TODO 0
-ok 10 0 # SKIP 0
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; Exit 1; }
 cat stdout
 
-count_test_results total=10 pass=2 fail=0 xpass=0 xfail=4 skip=4 error=0
+count_test_results total=10 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=0
 
 cat > exp << 'END'
 PASS: all.test 1 0
 PASS: all.test 2 - 0
-XFAIL: all.test 3 0 # TODO
-XFAIL: all.test 4 - 0 # TODO
-SKIP: all.test 5 0 # SKIP
-SKIP: all.test 6 - 0 # SKIP
-XFAIL: all.test 7 # TODO 0
-SKIP: all.test 8 # SKIP 0
-XFAIL: all.test 9 0 # TODO 0
-SKIP: all.test 10 0 # SKIP 0
+FAIL: all.test 3 0
+FAIL: all.test 4 - 0
+XPASS: all.test 5 0 # TODO
+XPASS: all.test 6 - 0 # TODO
+XFAIL: all.test 7 0 # TODO
+XFAIL: all.test 8 - 0 # TODO
+SKIP: all.test 9 0 # SKIP
+SKIP: all.test 10 - 0 # SKIP
 END
 
 $FGREP ': all.test' stdout > got
diff --git a/tests/tap-no-spurious.test b/tests/tap-no-spurious.test
index 91b115f..11e2d1a 100755
--- a/tests/tap-no-spurious.test
+++ b/tests/tap-no-spurious.test
@@ -88,12 +88,6 @@ Bail out
 # Bail out!
 END
 
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-
 $MAKE check >stdout || { cat stdout; Exit 1; }
 cat stdout
 
diff --git a/tests/tap-out-of-order.test b/tests/tap-out-of-order.test
index f8f69c7..9bf4685 100755
--- a/tests/tap-out-of-order.test
+++ b/tests/tap-out-of-order.test
@@ -58,13 +58,6 @@ ok 16
 ok 17
 END
 
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-
-
 TESTS='a.test b.test c.test d.test' $MAKE -e check >stdout \
   && { cat stdout; Exit 1; }
 cat stdout
diff --git a/tests/tap-recheck.test b/tests/tap-recheck.test
index 14b02ad..0139b07 100755
--- a/tests/tap-recheck.test
+++ b/tests/tap-recheck.test
@@ -20,16 +20,14 @@
 parallel_tests=yes
 . ./defs || Exit 1
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
+fetch_tap_driver
 
 cat >> configure.in <<END
-AC_SUBST([PERL], ['$PERL'])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEST_LOG_DRIVER = $(PERL) $(srcdir)/tap-driver
+TEST_LOG_DRIVER = $(srcdir)/tap-driver
 TESTS = a.test b.test c.test d.test
 END
 
diff --git a/tests/tap-setup.sh b/tests/tap-setup.sh
index 0d1a1e3..00397e0 100755
--- a/tests/tap-setup.sh
+++ b/tests/tap-setup.sh
@@ -31,8 +31,7 @@ test ! -f Makefile.am || mv Makefile.am Makefile.am~ \
 test -d ../tap-common-setup.dir && cp -Rp ../tap-common-setup.dir/* . \
   || fatal_ "couldn't get precomputed data files"
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
+fetch_tap_driver
 
 if test -f Makefile.am~; then
   mv -f Makefile.am~ Makefile.am \
diff --git a/tests/tap-summary-aux.sh b/tests/tap-summary-aux.sh
index a5cad53..7def11d 100755
--- a/tests/tap-summary-aux.sh
+++ b/tests/tap-summary-aux.sh
@@ -26,19 +26,17 @@ case $use_colors in
   *) fatal_ "invalid \$use_colors value '$use_colors'"
 esac
 
-cp "$top_testsrcdir"/lib/tap-driver . \
-  || fatal_ "failed to fetch auxiliary script tap-driver"
+fetch_tap_driver
 
 cat > configure.in <<END
 AC_INIT([GNU AutoTAP], [5.12], address@hidden)
 AM_INIT_AUTOMAKE([parallel-tests])
-AC_SUBST([PERL], ['$PERL'])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEST_LOG_DRIVER = $(PERL) $(srcdir)/tap-driver
+TEST_LOG_DRIVER = $(srcdir)/tap-driver
 TEST_LOG_COMPILER = cat
 TESTS = all.test
 END
diff --git a/tests/test-driver-custom-multitest.test 
b/tests/test-driver-custom-multitest.test
index 4fb023c..da15597 100755
--- a/tests/test-driver-custom-multitest.test
+++ b/tests/test-driver-custom-multitest.test
@@ -149,7 +149,7 @@ for vpath in : false; do
 
   # Check that the content of, and only of, the test logs with at least
   # one failing test case has been copied into `test-suite.log'.  Note
-  # that test logs containing skipped or failed test cases are *not*
+  # that test logs containing skipped or xfailed test cases are *not*
   # copied into `test-suite.log' -- a behaviour that deliberately differs
   # from the one of the built-in Automake test drivers.
   grep '%%' test-suite.log # For debugging.
diff --git a/tests/test-harness-vpath-rewrite.test 
b/tests/test-harness-vpath-rewrite.test
index 57ff909..f19506c 100755
--- a/tests/test-harness-vpath-rewrite.test
+++ b/tests/test-harness-vpath-rewrite.test
@@ -26,7 +26,6 @@ END
 
 cat > Makefile.am << 'END'
 LOG_COMPILER = true
-empty =
 TESTS = x0 foo bar baz x1
 EXTRA_DIST = $(TESTS)
 END
diff --git a/tests/vars3.test b/tests/vars3.test
index 5b6ff23..29dd575 100755
--- a/tests/vars3.test
+++ b/tests/vars3.test
@@ -43,34 +43,22 @@ cat stderr >&2
 # Lines number are printed in error message.
 # Use them to make sure errors are diagnosed against the right lines.
 
-# No error expected for these lines.
-grep 1: stderr
-grep 2: stderr && Exit 1
-grep 3: stderr && Exit 1
-grep 4: stderr
-grep 5: stderr
-grep 6: stderr && Exit 1
-grep 7: stderr
-grep 8: stderr
-grep 9: stderr
-grep 10: stderr && Exit 1
-grep 11: stderr && Exit 1
-grep 12: stderr && Exit 1
+# No error expected apart from those on these lines.
+grep -v '^Makefile\.am:[145789]:' stderr | grep . && Exit 1
 
 # Now check some individual values.
-grep 'shell echo' stderr
+grep ':1:.*shell echo' stderr
 grep 'nextvariableisbad' stderr && Exit 1
-grep 'addsuffix' stderr
-grep 'bad boy' stderr
-grep 'ok' stderr && Exit 1
-grep 'three errors' stderr
-grep 'on this' stderr
-grep 'long line' stderr
-grep 'o u c h' stderr
-grep 'wildcard' stderr
-grep 'another Error' stderr
-grep 'thisis' stderr && Exit 1
-grep 'here' stderr && Exit 1
+grep ':4:.*addsuffix' stderr
+grep ':5:.*bad boy' stderr
+grep ':7:.*three errors' stderr
+grep ':7:.*on this' stderr
+grep ':7:.*long line' stderr
+grep ':8:.*o u c h' stderr
+grep ':8:.*wildcard' stderr
+grep ':9:.*another Error' stderr
+
+$EGREP 'ok|thisis|here' stderr && Exit 1
 
 # None of these errors be diagnosed with `-Wno-portability'.
 $AUTOMAKE -Wno-portability
diff --git a/tests/version6.test b/tests/version6.test
index ca87e36..a7b6ca3 100755
--- a/tests/version6.test
+++ b/tests/version6.test
@@ -20,9 +20,17 @@
 
 amver=`$AUTOMAKE --version | sed -e 's/.* //;1q'`
 
+# Does the extracted version number seems legit?
+case $amver in
+  *[0-9].[0-9]*) ;;
+  *) fatal_ "couldn't extract version number from automake" ;;
+esac
+
 cat > Makefile.am << END
 AUTOMAKE_OPTIONS = $amver
 END
 
 $ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/vpath.test b/tests/vpath.test
index 4cbd5a1..76d3a53 100755
--- a/tests/vpath.test
+++ b/tests/vpath.test
@@ -27,5 +27,8 @@ END
 $ACLOCAL
 $AUTOMAKE
 
+grep VPATH Makefile.in # For debugging.
+grep '^VPATH = zardoz$' Makefile.in
 grep 'address@hidden@' Makefile.in && Exit 1
-Exit 0
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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