automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.2-19


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.2-193-g1192735
Date: Thu, 26 Jul 2012 16:29:34 +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=11927353c180858e7d7f4e775f8de68781ce4d71

The branch, master has been updated
       via  11927353c180858e7d7f4e775f8de68781ce4d71 (commit)
       via  106428fe4e73d5f9f5e7cc2e44a1e9b3b85606c1 (commit)
       via  7d6b27434de032d8b6f852eb49e788b87a5e7695 (commit)
       via  4d62ca97577bdafa20ce64d8811d1bdf4a7d3004 (commit)
       via  c3ab278adbd9673e5f1727ac1841e271694e3985 (commit)
       via  f2b8b7659ae48941ab0be64d1663dd673e097d58 (commit)
       via  db188c29be11177499d4c96bd2b8327e884f7d8c (commit)
       via  253e3eb74d8dabe3eb5c9b2b09dab00e319a6caf (commit)
       via  e82c9156efaf61db57f564f752befa1ac7b8863b (commit)
       via  d8b3c5e4b81986b875f56502006288f43aee5159 (commit)
       via  60f8b3de17ae8812c8e1fc6dd2eb8fe492aee9c7 (commit)
       via  1ab1f5462d358f7f3b99d2008d88c44f8c39cea6 (commit)
       via  4fcf43cd2814ae16d981f5f91ad0c7ad45a6ca52 (commit)
       via  7a42af01cbdc200ba91262a10edde6ad4bce3cda (commit)
       via  55fb714072e3d9c94d4209bd4bf2399ae0c99f08 (commit)
       via  feab5c26b22ea999c741866484f320460a7c7b16 (commit)
       via  3bb5a901116b8e610860477bb1d7e74f3c8d4e0f (commit)
       via  472e4e4708f841967623708898050de5d7c27eda (commit)
       via  22443fe751fe97c065e6285cf8dcc8e5009dc576 (commit)
       via  1f4d8c22ebc0bd4e7f9ec11ae371575d99b1e1a1 (commit)
       via  d9686f93fd450b468bbcdd55980be4008b6a0635 (commit)
       via  f01805fef617d3bf860a58c708abcbb34767d77c (commit)
       via  7f3690db42a7fb8a7cfb1f11bb8b8b22d23ec31f (commit)
       via  1a915b9a8afcd3b8ae119330cea79ba97cf27fc3 (commit)
       via  42bd480ccbe3cf252bbf33e0f7a5e5eacc75a5ce (commit)
       via  2bb312c8afbb7eb15bd794c638d72b4dd15dc4eb (commit)
       via  42fb45b7d98e9155d05f056609452f0ff2385333 (commit)
       via  ecbceb3e4cb88019e490c4814ca7a7382e4e2299 (commit)
       via  69f0f0a143dd9e8ddf45da1b0db2a99f305f2202 (commit)
       via  6976741a7978349023fb415370ed0c946672a7f4 (commit)
       via  9eefd8487a8d60ff3f93be0f2ab2bcb75876970e (commit)
       via  61856a0d0a67d378bf64333a5b3ebd82424aebaf (commit)
       via  2dde586a7605f973accb99d41990804fdd028bab (commit)
       via  42d9439da93eb64ef3bb96e012cf4ab88f7f63ac (commit)
       via  3971f998c5388a46581b2a2c273283ef6f1e5408 (commit)
       via  d25349fe0524e7b6c7961f090cced631ee95aff6 (commit)
       via  b4f5f5b31ad281dd3d11b19ee125da7fc9e948f4 (commit)
       via  00a297e46a719dfb954657c569554db74eedcc64 (commit)
       via  a237c2cfdb919dad8ba36834ddd1649f670e6630 (commit)
       via  8d88ae22d7599c8617e1c53494860c65e3c1b410 (commit)
       via  eb07a5811b8df9ef3f94fb98adccf0f7d74f8559 (commit)
       via  d1a7148c7094f9d7bf188e90f072a01c7b5279ca (commit)
      from  06143bdbbf8c3d358d51b646165634473c193afe (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 11927353c180858e7d7f4e775f8de68781ce4d71
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jul 26 18:27:15 2012 +0200

    typofix: in a comment in Makefile.am
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 106428fe4e73d5f9f5e7cc2e44a1e9b3b85606c1
Merge: 06143bd 7d6b274
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jul 26 18:16:47 2012 +0200

    Merge branch 'maint'
    
    * maint: (38 commits)
      maintcheck: fixup list of files in $(xdefs)
      tests: never source test-defs.sh directly, source test-lib.sh instead
      runtest: sanitize test environment
      tests: remove an obsolescent self test
      tests: "am_using_tap=yes" -> "am_test_protocol=tap"
      tests: protect test libs against multiple inclusion
      configure: testsuite shell can return early from "dot-sourced" files
      tests: move sanitization and "Bournification" in the generic test lib
      tests: source test defs in the generic test lib
      test defs: no need to re-add $srcdir/t/ax to $PATH
      tests: split test libs into "generic" and "automake-specific"
      test setup: move actual calling of testsuite setup in ./defs
      test setup: merge definitions of function for simple tests
      test init: refactor: new function 'am_test_setup'
      test init: refactor: move displaying of debugging info later
      test init: refactor: new function 'am_setup_testdir'
      test init: refactor: new function 'am_set_exit_traps'
      configure: testsuite shell set exit traps in shell functions
      test init: refactor: new function 'am_exit_trap'
      test init: refactor: new function 'process_requirements'
      ...
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 .gitignore                                 |    2 +-
 Makefile.am                                |   60 ++++--
 configure.ac                               |   13 ++
 defs                                       |   12 +-
 gen-testsuite-part                         |   35 ++--
 runtest.in                                 |   85 +++++++--
 syntax-checks.mk                           |    7 +-
 t/README                                   |    2 +-
 t/ax/{test-init.sh => am-test-lib.sh}      |  312 ++++------------------------
 t/ax/plain-functions.sh                    |   40 ----
 t/ax/tap-setup.sh                          |    2 +-
 defs-static.in => t/ax/test-defs.in        |   76 +------
 t/ax/test-lib.sh                           |  296 ++++++++++++++++++++++++++
 t/list-of-tests.mk                         |    3 -
 t/primary-prefix-couples-force-valid.sh    |    7 +-
 t/self-check-env-sanitize.tap              |   56 -----
 t/self-check-tap.sh                        |   45 ----
 t/tap-ambiguous-directive.sh               |    2 +-
 t/tap-autonumber.sh                        |    2 +-
 t/tap-bailout-and-logging.sh               |    2 +-
 t/tap-bailout-leading-space.sh             |    2 +-
 t/tap-bailout-suppress-badexit.sh          |    2 +-
 t/tap-bailout-suppress-later-diagnostic.sh |    2 +-
 t/tap-bailout-suppress-later-errors.sh     |    2 +-
 t/tap-bailout.sh                           |    2 +-
 t/tap-color.sh                             |    2 +-
 t/tap-deps.sh                              |    2 +-
 t/tap-diagnostic.sh                        |    2 +-
 t/tap-empty-diagnostic.sh                  |    2 +-
 t/tap-empty.sh                             |    2 +-
 t/tap-escape-directive-2.sh                |    2 +-
 t/tap-escape-directive.sh                  |    2 +-
 t/tap-exit.sh                              |    2 +-
 t/tap-fancy.sh                             |    2 +-
 t/tap-fancy2.sh                            |    2 +-
 t/tap-global-log.sh                        |    2 +-
 t/tap-global-result.sh                     |    2 +-
 t/tap-log.sh                               |    2 +-
 t/tap-merge-stdout-stderr.sh               |    2 +-
 t/tap-missing-plan-and-bad-exit.sh         |    2 +-
 t/tap-msg0-bailout.sh                      |    2 +-
 t/tap-msg0-directive.sh                    |    2 +-
 t/tap-msg0-misc.sh                         |    2 +-
 t/tap-msg0-planskip.sh                     |    2 +-
 t/tap-msg0-result.sh                       |    2 +-
 t/tap-negative-numbers.sh                  |    2 +-
 t/tap-no-disable-hard-error.sh             |    2 +-
 t/tap-no-merge-stdout-stderr.sh            |    2 +-
 t/tap-no-spurious-numbers.sh               |    2 +-
 t/tap-no-spurious-summary.sh               |    2 +-
 t/tap-no-spurious.sh                       |    2 +-
 t/tap-not-ok-skip.sh                       |    2 +-
 t/tap-number-wordboundary.sh               |    2 +-
 t/tap-numbers-leading-zero.sh              |    2 +-
 t/tap-numeric-description.sh               |    2 +-
 t/tap-out-of-order.sh                      |    2 +-
 t/tap-passthrough-exit.sh                  |    2 +-
 t/tap-passthrough.sh                       |    2 +-
 t/tap-plan-corner.sh                       |    2 +-
 t/tap-plan-errors.sh                       |    2 +-
 t/tap-plan-leading-zero.sh                 |    2 +-
 t/tap-plan-malformed.sh                    |    2 +-
 t/tap-plan-middle.sh                       |    2 +-
 t/tap-plan-whitespace.sh                   |    2 +-
 t/tap-plan.sh                              |    2 +-
 t/tap-planskip-and-logging.sh              |    2 +-
 t/tap-planskip-badexit.sh                  |    2 +-
 t/tap-planskip-bailout.sh                  |    2 +-
 t/tap-planskip-case-insensitive.sh         |    2 +-
 t/tap-planskip-late.sh                     |    2 +-
 t/tap-planskip-later-errors.sh             |    2 +-
 t/tap-planskip-unplanned-corner.sh         |    2 +-
 t/tap-planskip-unplanned.sh                |    2 +-
 t/tap-planskip-whitespace.sh               |    2 +-
 t/tap-planskip.sh                          |    2 +-
 t/tap-realtime.sh                          |    2 +-
 t/tap-recheck-logs.sh                      |    2 +-
 t/tap-result-comment.sh                    |    2 +-
 t/tap-summary-color.sh                     |    4 +-
 t/tap-summary.sh                           |    4 +-
 t/tap-test-number-0.sh                     |    2 +-
 t/tap-todo-skip-together.sh                |    2 +-
 t/tap-todo-skip-whitespace.sh              |    2 +-
 t/tap-todo-skip.sh                         |    2 +-
 t/tap-unplanned.sh                         |    2 +-
 t/tap-whitespace-normalization.sh          |    2 +-
 t/tap-with-and-without-number.sh           |    2 +-
 t/tap-xfail-tests.sh                       |    2 +-
 t/testsuite-summary-color.sh               |    8 +-
 t/testsuite-summary-count.sh               |    8 +-
 90 files changed, 596 insertions(+), 619 deletions(-)
 rename t/ax/{test-init.sh => am-test-lib.sh} (74%)
 delete mode 100644 t/ax/plain-functions.sh
 rename defs-static.in => t/ax/test-defs.in (73%)
 create mode 100644 t/ax/test-lib.sh
 delete mode 100755 t/self-check-env-sanitize.tap
 delete mode 100755 t/self-check-tap.sh

diff --git a/.gitignore b/.gitignore
index b09a0a6..c42aef3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,7 +38,7 @@
 /test-suite.log
 /t/wrap/aclocal-1.*
 /t/wrap/automake-1.*
-/defs-static
+/t/ax/test-defs.sh
 /t/testsuite-part.am
 /t/*-w.tap
 /t/*-w.sh
diff --git a/Makefile.am b/Makefile.am
index a5332d3..98a67a0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -329,14 +329,17 @@ TESTS = ## Will be updated later.
 
 # Some testsuite-influential variables should be overridable from the
 # test scripts, but not from the environment.
+# Keep this in sync with the similar list in 'runtest.in'.
 AM_TESTS_ENVIRONMENT = \
   for v in \
     required \
-    am_using_tap \
+    am_test_protocol \
     am_serial_tests \
     am_test_prefer_config_shell \
     am_original_AUTOMAKE \
     am_original_ACLOCAL \
+    am_test_lib_sourced \
+    test_lib_sourced \
   ; do \
     eval test x"\$${$$v}" = x || unset $$v; \
   done;
@@ -345,6 +348,16 @@ AM_TESTS_ENVIRONMENT = \
 AM_TESTS_FD_REDIRECT = 9>&2
 AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
 
+# For sourcing of extra "shell libraries" by our test scripts.  As per
+# POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
+# in case it is given with a relative name containing no slashes.
+AM_TESTS_ENVIRONMENT += \
+  if test $(srcdir) != .; then \
+    PATH='$(abs_srcdir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
+  fi; \
+  PATH='$(abs_builddir)/t/ax'$(PATH_SEPARATOR)$$PATH; \
+  export PATH;
+
 # Hand-written tests.
 
 include $(srcdir)/t/list-of-tests.mk
@@ -379,26 +392,34 @@ include $(srcdir)/contrib/t/local.am
 TESTS += $(contrib_TESTS)
 EXTRA_DIST += $(contrib_TESTS)
 
-# Static dependencies valid for each test case.
-check_SCRIPTS = t/wrap/aclocal-$(APIVERSION) t/wrap/automake-$(APIVERSION)
-dist_check_DATA = \
-  t/ax/test-init.sh  \
-  t/ax/plain-functions.sh  \
+# Static dependencies valid for each test case (also further
+# extended later).  Note that use 'noinst_' rather than 'check_'
+# as the prefix, because we really want them to be built by
+# "make all".  This makes it easier to run the test cases by
+# hand after having simply configured and built the package.
+
+nodist_noinst_SCRIPTS = \
+  t/wrap/aclocal-$(APIVERSION) \
+  t/wrap/automake-$(APIVERSION)
+
+dist_noinst_DATA = \
+  t/ax/test-lib.sh \
+  t/ax/am-test-lib.sh \
   t/ax/tap-functions.sh
-nodist_check_DATA = defs-static
 
 # Few more static dependencies.
 t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am
 t/distcheck-outdated-m4.log: t/ax/distcheck-hook-m4.am
 EXTRA_DIST += t/ax/distcheck-hook-m4.am
 
-defs-static: defs-static.in Makefile
+t/ax/test-defs.sh: t/ax/test-defs.in Makefile
        $(AM_V_at)rm -f $@ address@hidden
-       $(AM_V_GEN)in=defs-static.in\
-         && $(do_subst) <$(srcdir)/defs-static.in >address@hidden
+       $(AM_V_GEN)in=t/ax/test-defs.in \
+         && $(do_subst) <$(srcdir)/$$in >address@hidden
        $(generated_file_finalize)
-EXTRA_DIST += defs-static.in
-CLEANFILES += defs-static
+EXTRA_DIST += t/ax/test-defs.in
+CLEANFILES += t/ax/test-defs.sh
+nodist_noinst_DATA = t/ax/test-defs.sh
 
 runtest: runtest.in Makefile
        $(AM_V_at)rm -f $@ address@hidden
@@ -462,7 +483,7 @@ check-local: check-tests-syntax
 .PHONY: check-tests-syntax
 
 ## Checking the list of tests.
-test_subdirs = t t/pm t/perf contrib/t
+test_subdirs = t t/pm contrib/t
 include $(srcdir)/t/CheckListOfTests.am
 
 # Run the testsuite with the installed aclocal and automake.
@@ -470,10 +491,19 @@ installcheck-local: installcheck-testsuite
 installcheck-testsuite:
        am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
 
+# Performance tests.
+.PHONY: perf
+perf: all
+       $(MAKE) $(AM_MAKEFLAGS) TEST_SUITE_LOG='$(PERF_TEST_SUITE_LOG)' \
+                               TESTS='$(perf_TESTS)' check
+PERF_TEST_SUITE_LOG = t/perf/test-suite.log
+CLEANFILES += $(PERF_TEST_SUITE_LOG)
+EXTRA_DIST += $(perf_TESTS)
+
 clean-local: clean-local-check
 .PHONY: clean-local-check
 clean-local-check:
-## Directries candidate to be test directories match this wildcard.
+## Directories candidate to be test directories match this wildcard.
        @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \
 ## The 'nullglob' bash option is not portable, so use perl.
        dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \
@@ -545,7 +575,7 @@ amhello_configury = \
   missing \
   src/Makefile.in
 
-dist_noinst_DATA = $(amhello_sources)
+dist_noinst_DATA += $(amhello_sources)
 dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
 
 # We depend on configure.ac so that we regenerate the tarball
diff --git a/configure.ac b/configure.ac
index 69edd9a..b3dfe1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -325,10 +325,23 @@ AC_DEFUN([_AM_CHECK_CANDIDATE_SHELL],
       [], [am_score=1; break])
 
     _AM_CHECK_SHELL_FEATURE([$1],
+      [can define exit traps in a shell function],
+      [fail=0 && foo() { trap 'fail=1' 0; } && foo && test $fail = 0],
+      [], [am_score=1; break])
+
+    _AM_CHECK_SHELL_FEATURE([$1],
       [corrupts stderr with "set -x"],
       [(set -x; P=1 true 2>&3) 3>&1 2>/dev/null | grep P=1],
       [am_score=9], [])
 
+    echo 'return 34' > conftest-return.sh
+    echo 'ok=no' >> conftest-return.sh
+    _AM_CHECK_SHELL_FEATURE([$1],
+      [can return early from "dot-sourced" files],
+      [ok=yes; . ./conftest-return.sh; test $? -eq 34 && test $ok = yes],
+      [rm -f conftest-return.sh],
+      [rm -f conftest-return.sh; am_score=1; break])
+
     echo 'alias false=echo' > conftest-alias.sh
     echo 'false && test "$(false 97)" = 97' >> conftest-alias.sh
     _AM_CHECK_SHELL_FEATURE([$1],
diff --git a/defs b/defs
index df85746..1ee1116 100644
--- a/defs
+++ b/defs
@@ -15,9 +15,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Source the shell static setup and variable definitions.
-. ./defs-static; test $? -eq 0 || exit 99
+set -e
 
-# Source the actual test initialization and setup code, and return
-# control to the test script that is sourcing us.
-. "$am_testauxdir/test-init.sh"
+# Source the actual code for test initialization and setup.
+. test-lib.sh
+. am-test-lib.sh
+
+# Run that setup, and return control to the test script sourcing us.
+am_test_setup
diff --git a/gen-testsuite-part b/gen-testsuite-part
index 25da45c..21c26c4 100755
--- a/gen-testsuite-part
+++ b/gen-testsuite-part
@@ -31,6 +31,13 @@ my $me = File::Basename::basename $0;
 # For use in VPATH builds.
 my $srcdir = ".";
 
+# The testsuite subdirectory, relative to the top-lever source directory.
+my $testdir = "t";
+
+# Where testsuite-related helper scripts, data files and shell libraries
+# are placed.  Relative to the top-lever source directory.
+my $testauxdir = "$testdir/ax";
+
 #--------------------------------------------------------------------------
 
 sub unindent ($)
@@ -89,7 +96,7 @@ sub write_wrapper_script ($$$)
   print $file_handle unindent <<EOF;
     #! /bin/sh
     # This file has been automatically generated.  DO NOT EDIT BY HAND!
-    . ./defs-static || exit 1
+    . test-lib.sh
     $shell_setup_code
     # In the spirit of VPATH, we prefer a test in the build tree
     # over one in the source tree.
@@ -109,7 +116,7 @@ sub get_list_of_tests ()
   my $make = defined $ENV{MAKE} ? $ENV{MAKE} : "make";
   # Unset MAKEFLAGS, for when we are called from make itself.
   my $cmd = "MAKEFLAGS= && unset MAKEFLAGS && cd '$srcdir' && "
-            . "$make -s -f t/list-of-tests.mk print-list-of-tests";
+            . "$make -s -f $testdir/list-of-tests.mk print-list-of-tests";
   my @tests_list = split /\s+/, `$cmd`;
   die "$me: cannot get list of tests\n" unless $? == 0 && @tests_list;
   my $ok = 1;
@@ -135,52 +142,48 @@ sub parse_options (@)
 
 #--------------------------------------------------------------------------
 
-# Where testsuite-related helper scripts, data files and shell libraries
-# are placed.  Relative to the 't/' subdirectory.
-my $auxdir = "ax";
-
 my %deps_extractor =
   (
     libtool_macros =>
       {
         line_matcher => qr/^\s*required=.*\blibtool/,
-        nodist_prereqs => "t/libtool-macros.log",
+        nodist_prereqs => "$testdir/libtool-macros.log",
       },
     gettext_macros =>
       {
         line_matcher => qr/^\s*required=.*\bgettext/,
-        nodist_prereqs => "t/gettext-macros.log",
+        nodist_prereqs => "$testdir/gettext-macros.log",
       },
     use_trivial_test_driver =>
       {
         line_matcher => qr/\btrivial-test-driver\b/,
-        dist_prereqs => "t/$auxdir/trivial-test-driver",
+        dist_prereqs => "$testauxdir/trivial-test-driver",
       },
     check_testsuite_summary =>
       {
         line_matcher => qr/\btestsuite-summary-checks\.sh\b/,
-        dist_prereqs => "t/$auxdir/testsuite-summary-checks.sh",
+        dist_prereqs => "$testauxdir/testsuite-summary-checks.sh",
       },
     extract_testsuite_summary =>
       {
         line_matcher => qr/\bextract-testsuite-summary\.pl\b/,
-        dist_prereqs => "t/$auxdir/extract-testsuite-summary.pl",
+        dist_prereqs => "$testauxdir/extract-testsuite-summary.pl",
       },
     check_tap_testsuite_summary =>
       {
         line_matcher => qr/\btap-summary-aux\.sh\b/,
-        dist_prereqs => "t/$auxdir/tap-summary-aux.sh",
+        dist_prereqs => "$testauxdir/tap-summary-aux.sh",
       },
     on_tap_with_common_setup =>
       {
         line_matcher => qr/\btap-setup\.sh\b/,
-        dist_prereqs => "t/$auxdir/tap-setup.sh",
-        nodist_prereqs => "t/tap-common-setup.log",
+        dist_prereqs => "$testauxdir/tap-setup.sh",
+        nodist_prereqs => "$testdir/tap-common-setup.log",
       },
     depcomp =>
       {
         line_matcher => qr/\bdepcomp\.sh\b/,
-        dist_prereqs => "t/$auxdir/depcomp.sh",
+        dist_prereqs => "$testauxdir/depcomp.sh",
       },
   );
 
@@ -344,7 +347,7 @@ foreach my $lt (TRUE, FALSE)
             "depmode=$m",
             "depcomp_with_libtool=" . ($lt ? "yes" : "no"),
           );
-        my $test = "t/depcomp" . ($lt ? "-lt-" : "-") . $m . ".tap";
+        my $test = "$testdir/depcomp" . ($lt ? "-lt-" : "-") . "$m.tap";
         # Register wrapper test as "autogenerated" ...
         push @generated_tests, $test;
         # ... and create it.
diff --git a/runtest.in b/runtest.in
index 31f8e01..c2c5d1f 100644
--- a/runtest.in
+++ b/runtest.in
@@ -16,7 +16,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Run an Automake test from the command line.
-# Usage:
 
 set -e; set -u
 
@@ -24,28 +23,77 @@ set -e; set -u
 : ${AM_PROVE_CMD='prove'}
 : ${AM_PROVEFLAGS='--merge --verbose'}
 : ${srcdir='@srcdir@'}
+: ${abs_srcdir='@abs_srcdir@'}
+: ${abs_builddir='@abs_builddir@'}
+: ${PATH_SEPARATOR='@PATH_SEPARATOR@'}
+
+# For sourcing of extra "shell libraries" by our test scripts.  As per
+# POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
+# in case it is given with a relative name containing no slashes.
+if test "$srcdir" != .; then
+  PATH=$abs_srcdir/t/ax$PATH_SEPARATOR$PATH
+fi
+PATH=$abs_builddir/t/ax$PATH_SEPARATOR$PATH
+export PATH
+
+# For use by the testsuite framework.  The Automake test harness
+# define this, so we better do the same.
+export srcdir
+
+# Some testsuite-influential variables should be overridable from the
+# test scripts, but not from the environment.
+# Keep this in sync with the 'Makefile.am:AM_TESTS_ENVIRONMENT'.
+for v in \
+  required \
+  am_test_protocol \
+  am_serial_tests \
+  am_test_prefer_config_shell \
+  am_original_AUTOMAKE \
+  am_original_ACLOCAL \
+  am_test_lib_sourced \
+  test_lib_sourced \
+; do
+  eval "$v= && unset $v" || exit 1
+done
+unset v
 
 error () { echo "$0: $*" >&2; exit 255; }
 
 # Some shell flags should be passed over to the test scripts.
-#while test $# -gt 0; do
-#  case $1 in
-#    --help) echo "Usage: $0 [SHELL-OPTIONS] TEST [TEST-OPTIONS]"; exit $?;;
-#    -*)
-#  esac
-#done
+shell_opts=
+while test $# -gt 0; do
+  case $1 in
+    --help)
+       echo "Usage: $0 [--shell=PATH] [SHELL-OPTIONS] TEST [TEST-OPTIONS]"
+       exit $?
+       ;;
+    --shell)
+       test $# -gt 1 || error "missing argument for option '$1'"
+       AM_TEST_RUNNER_SHELL=$2
+       shift
+       ;;
+    --shell=*)
+       AM_TEST_RUNNER_SHELL=${1#--shell=}
+       ;;
+    -o)
+       test $# -gt 1 || error "missing argument for option '$1'"
+       shell_opts="$shell_opts -o $2"
+       shift
+       ;;
+    -*)
+       # Assume it is an option to pass through to the shell.
+       shell_opts="$shell_opts $1";;
+     *)
+       break;;
+  esac
+  shift
+done
 
 test $# -gt 0 || error "missing argument"
 
 tst=$1; shift
 
 case $tst in
-   *.sh) wrapper () { exec "$@"; };;
-  *.tap) wrapper () { exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e "$@"; };;
-      *) error "test '$tst' has an unrecognized extension";;
-esac
-
-case $tst in
   /*) ;;
    *) if test -f ./$tst; then
         tst=./$tst
@@ -58,5 +106,14 @@ case $tst in
       ;;
 esac
 
-wrapper "$AM_TEST_RUNNER_SHELL" "$tst" "$@"
+case $tst in
+  *.sh)
+    exec $AM_TEST_RUNNER_SHELL $shell_opts "$tst" "$@" ;;
+  *.tap)
+    exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e \
+         "$AM_TEST_RUNNER_SHELL $shell_opts" "$tst" "$@" ;;
+  *)
+    error "test '$tst' has an unrecognized extension" ;;
+esac
+
 error "dead code reached"
diff --git a/syntax-checks.mk b/syntax-checks.mk
index 6ebaf69..032e7be 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -31,7 +31,11 @@ xtests := $(shell \
      done; \
    done | sort)
 
-xdefs = $(srcdir)/t/ax/test-init.sh $(srcdir)/defs $(srcdir)/defs-static.in
+xdefs = \
+  $(srcdir)/t/ax/am-test-lib.sh \
+  $(srcdir)/t/ax/test-lib.sh \
+  $(srcdir)/t/ax/test-defs.in \
+  $(srcdir)/defs
 
 ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '*.am' -print)
 
@@ -217,6 +221,7 @@ sc_tests_make_without_am_makeflags:
 sc_tests_obsolete_variables:
        @vars=" \
          using_tap \
+         am_using_tap \
          test_prefer_config_shell \
          original_AUTOMAKE \
          original_ACLOCAL \
diff --git a/t/README b/t/README
index 60b4252..06f087f 100644
--- a/t/README
+++ b/t/README
@@ -234,7 +234,7 @@ Writing test cases
   example, if you need to copy or grep an automake-provided script,
   do not assume that they can be found in the '$top_srcdir/lib'
   directory, but use '$am_scriptdir' instead.  The complete list of
-  such "$am_...dir" variables can be found in the 'defs-static.in'
+  such "$am_...dir" variables can be found in the 't/ax/test-defs.in'
   file.
 
 * When writing input for lex, include the following in the definitions
diff --git a/t/ax/test-init.sh b/t/ax/am-test-lib.sh
similarity index 74%
rename from t/ax/test-init.sh
rename to t/ax/am-test-lib.sh
index c2c8d4d..e2723f3 100644
--- a/t/ax/test-init.sh
+++ b/t/ax/am-test-lib.sh
@@ -19,56 +19,16 @@
 ###  IMPORTANT NOTE: keep this file 'set -e' clean.  ###
 ########################################################
 
-# Enable the errexit shell flag early.
-set -e
-
-
-## --------------------- ##
-##  Early sanity checks. ##
-## --------------------- ##
-
-# Ensure $am_top_srcdir is set correctly.
-test -f "$am_top_srcdir/defs-static.in" || {
-   echo "$me: $am_top_srcdir/defs-static.in not found," \
-        "check \$am_top_srcdir" >&2
-   exit 99
-}
-
-# Ensure $am_top_builddir is set correctly.
-test -f "$am_top_builddir/defs-static" || {
-   echo "$me: $am_top_builddir/defs-static not found," \
-        "check \$am_top_builddir" >&2
-   exit 99
-}
-
-
-## ------------------ ##
-##  Early variables.  ##
-## ------------------ ##
+# Do not source several times.
+test ${am_test_lib_sourced-no} = yes && return 0
+am_test_lib_sourced=yes
 
-# A single whitespace character.
-sp=' '
-# A tabulation character.
-tab='  '
-# A newline character.
-nl='
-'
 # A literal escape character.  Used by test checking colored output.
 esc=''
 
-# As autoconf-generated configure scripts do, ensure that IFS
-# is defined initially, so that saving and restoring $IFS works.
-IFS=$sp$tab$nl
-
-
-## ----------------------- ##
-##  Early debugging info.  ##
-## ----------------------- ##
-
-echo "Running from installcheck: $am_running_installcheck"
-echo "Using TAP: $am_using_tap"
-echo "PATH = $PATH"
-
+# This might be used in testcases checking distribution-related features.
+# Test scripts are free to override this if they need to.
+distdir=$me-1.0
 
 ## ---------------------- ##
 ##  Environment cleanup.  ##
@@ -128,56 +88,6 @@ unset pfx
 # Re-enable, it had been temporarily disabled above.
 set -e
 
-## ---------------------------- ##
-##  Auxiliary shell functions.  ##
-## ---------------------------- ##
-
-# Tell whether we should keep the test directories around, even in
-# case of success.  By default, we don't.
-am_keeping_testdirs ()
-{
-  case $keep_testdirs in
-     ""|n|no|NO) return 1;;
-              *) return 0;;
-  esac
-}
-
-# This is used in '_am_exit' and in the exit trap.  See comments in
-# the latter for more information.
-am__test_skipped=no
-
-# We use a trap below for cleanup.  This requires us to go through
-# hoops to get the right exit status transported through the signal.
-# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
-# sh inside this function (FIXME: is this still relevant now that we
-# require a POSIX shell?).
-_am_exit ()
-{
-  set +e
-  # See comments in the exit trap for the reason we do this.
-  test 77 = $1 && am__test_skipped=yes
-  # Spurious escaping to ensure we do not call our 'exit' alias.
-  (\exit $1); \exit $1
-}
-alias exit=_am_exit
-
-if test $am_using_tap = yes; then
-  am_funcs_file=tap-functions.sh
-else
-  am_funcs_file=plain-functions.sh
-fi
-
-if test -f "$am_testauxdir/$am_funcs_file"; then
-  . "$am_testauxdir/$am_funcs_file" || {
-    echo "$me: error sourcing $am_testauxdir/$am_funcs_file" >&2
-    exit 99
-  }
-else
-  echo "$me: $am_testauxdir/$am_funcs_file not found" >&2
-  exit 99
-fi
-unset am_funcs_file
-
 # cross_compiling
 # ---------------
 # Tell whether we are cross-compiling.  This is especially useful to skip
@@ -245,7 +155,7 @@ AUTOMAKE_run ()
   $AUTOMAKE ${1+"$@"} >stdout 2>stderr || am__got_rc=$?
   cat stderr >&2
   cat stdout
-  if test $am_using_tap != yes; then
+  if test $am_test_protocol = none; then
     test $am__got_rc -eq $am__exp_rc || exit 1
     return
   fi
@@ -428,41 +338,6 @@ am__useless_vpath_rebuild=""
 
 yl_distcheck () { useless_vpath_rebuild || $MAKE distcheck ${1+"$@"}; }
 
-# seq_ - print a sequence of numbers
-# ----------------------------------
-# This function simulates GNU seq(1) portably.  Valid usages:
-#  - seq LAST
-#  - seq FIRST LAST
-#  - seq FIRST INCREMENT LAST
-seq_ ()
-{
-  case $# in
-    0) fatal_ "seq_: missing argument";;
-    1) seq_first=1  seq_incr=1  seq_last=$1;;
-    2) seq_first=$1 seq_incr=1  seq_last=$2;;
-    3) seq_first=$1 seq_incr=$2 seq_last=$3;;
-    *) fatal_ "seq_: too many arguments";;
-  esac
-  i=$seq_first
-  while test $i -le $seq_last; do
-    echo $i
-    i=$(($i + $seq_incr))
-  done
-}
-
-# rm_rf_ [FILES OR DIRECTORIES ...]
-# ---------------------------------
-# Recursively remove the given files or directory, also handling the case
-# of non-writable subdirectories.
-rm_rf_ ()
-{
-  test $# -gt 0 || return 0
-  # Ignore failures in find, we are only interested in failures of the
-  # final rm.
-  find "$@" -type d ! -perm -700 -exec chmod u+rwx {} \; || :
-  rm -rf "$@"
-}
-
 # count_test_results total=N pass=N fail=N xpass=N xfail=N skip=N error=N
 # -----------------------------------------------------------------------
 # Check that a testsuite run driven by the parallel-tests harness has
@@ -500,37 +375,6 @@ count_test_results ()
   )
 }
 
-commented_sed_unindent_prog='
-  /^$/b                    # Nothing to do for empty lines.
-  x                        # Get x<indent> into pattern space.
-  /^$/{                    # No prior x<indent>, go prepare it.
-    g                      # Copy this 1st non-blank line into pattern space.
-    s/^\(['"$tab"' ]*\).*/x\1/   # Prepare x<indent> in pattern space.
-  }                        # Now: x<indent> in pattern and <line> in hold.
-  G                        # Build x<indent>\n<line> in pattern space, and
-  h                        # duplicate it into hold space.
-  s/\n.*$//                # Restore x<indent> in pattern space, and
-  x                        # exchange with the above duplicate in hold space.
-  s/^x\(.*\)\n\1//         # Remove leading <indent> from <line>.
-  s/^x.*\n//               # Restore <line> when there is no leading <indent>.
-'
-
-# unindent [input files...]
-# -------------------------
-# Remove the "proper" amount of leading whitespace from the given files,
-# and output the result on stdout.  That amount is determined by looking
-# at the leading whitespace of the first non-blank line in the input
-# files.  If no input file is specified, standard input is implied.
-unindent ()
-{
-  if test x"$sed_unindent_prog" = x; then
-    sed_unindent_prog=$(printf '%s\n' "$commented_sed_unindent_prog" \
-                          | sed -e "s/  *# .*//")
-  fi
-  sed "$sed_unindent_prog" ${1+"$@"}
-}
-sed_unindent_prog="" # Avoid interferences from the environment.
-
 # get_shell_script SCRIPT-NAME
 # -----------------------------
 # Fetch an Automake-provided shell script from the 'lib/' directory into
@@ -654,25 +498,12 @@ require_compiler_ ()
 ##  required by them.                                          ##
 ## ----------------------------------------------------------- ##
 
-# Performance tests must be enabled explicitly.
-case $argv0 in
-  */perf/*)
-    case $AM_TESTSUITE_PERF in
-      [yY]|[yY]es|1) ;;
-      *) skip_ "performance tests not explicitly enabled" ;;
-    esac
-    ;;
-esac
-
-# Look for (and maybe set up) required tools and/or system features; skip
-# the current test if they are not found.
-for tool in : $required
-do
-  # Check that each required tool is present.
-  case $tool in
-    :) ;;
+require_tool ()
+{
+  am_tool=$1
+  case $1 in
     cc|c++|fortran|fortran77)
-      require_compiler_ $tool;;
+      require_compiler_ $1;;
     xsi-lib-shell)
       if test x"$am_test_prefer_config_shell" = x"yes"; then
         require_xsi "$SHELL"
@@ -878,94 +709,40 @@ do
       ;;
     *)
       # Generic case: the tool must support --version.
-      echo "$me: running $tool --version"
-      # It is not likely but possible that $tool is a special builtin,
-      # in which case the shell is allowed to exit after an error.  So
-      # we need the subshell here.  Also, some tools, like Sun cscope,
+      echo "$me: running $1 --version"
+      # It is not likely but possible that the required tool is a special
+      # builtin, in which case the shell is allowed to exit after an error.
+      # So we need the subshell here.  Also, some tools, like Sun cscope,
       # can be interactive without redirection.
-      ($tool --version) </dev/null \
-        || skip_all_ "required program '$tool' not available"
+      ($1 --version) </dev/null \
+        || skip_all_ "required program '$1' not available"
       ;;
   esac
-done
-
-# We might need extra macros, e.g., from Libtool or Gettext.
-case " $required " in *\ libtool*) . ./t/libtool-macros.dir/get.sh;; esac
-case " $required " in *\ gettext*) . ./t/gettext-macros.dir/get.sh;; esac
+}
 
+process_requirements ()
+{
+  # Look for (and maybe set up) required tools and/or system features;
+  # skip the current test if they are not found.
+  for am_tool in $*; do
+    require_tool $am_tool
+  done
+  unset am_tool
+  # We might need extra macros, e.g., from Libtool or Gettext.
+  case " $required " in
+    *\ libtool*) . ./t/libtool-macros.dir/get.sh;;
+  esac
+  case " $required " in
+    *\ gettext*) . ./t/gettext-macros.dir/get.sh;;
+  esac
+}
 
 ## ---------------------------------------------------------------- ##
 ##  Create and set up of the temporary directory used by the test.  ##
-##  Set up of the exit trap for cleanup of said directory.          ##
 ## ---------------------------------------------------------------- ##
 
-# This might be used in testcases checking distribution-related features.
-# Test scripts are free to override this if they need to.
-distdir=$me-1.0
-
-# Set up the exit trap.
-trap 'exit_status=$?
-  set +e
-  cd "$am_top_builddir"
-  if test $am_using_tap = yes; then
-    if test "$planned_" = later && test $exit_status -eq 0; then
-      plan_ "now"
-    fi
-    test $exit_status -eq 0 && test $tap_pass_count_ -eq $tap_count_ \
-      || keep_testdirs=yes
-  else
-    # This is to ensure that a test script does give a SKIP outcome just
-    # because a command in it happens to exit with status 77.  This
-    # behaviour, while from time to time useful to developers, is not
-    # meant to be enabled by default, as it could cause spurious failures
-    # in the wild.  Thus it will be enabled only when the variable
-    # "am_explicit_skips" is set to a "true" value.
-    case $am_explicit_skips in
-      [yY]|[yY]es|1)
-        if test $exit_status -eq 77 && test $am__test_skipped != yes; then
-          echo "$me: implicit skip turned into failure"
-          exit_status=78
-        fi;;
-    esac
-    test $exit_status -eq 0 || keep_testdirs=yes
-  fi
-  am_keeping_testdirs || rm_rf_ $am_test_subdir
-  set +x
-  echo "$me: exit $exit_status"
-  # Spurious escaping to ensure we do not call our "exit" alias.
-  \exit $exit_status
-' 0
-trap "fatal_ 'caught signal SIGHUP'" 1
-trap "fatal_ 'caught signal SIGINT'" 2
-trap "fatal_ 'caught signal SIGTERM'" 15
-# Various shells seems to just ignore SIGQUIT under some circumstances,
-# even if the signal is not blocked; however, if the signal it trapped,
-# the trap gets correctly executed.  So we also trap SIGQUIT.
-# Here is a list of some shells that have been verified to exhibit the
-# problematic behavior with SIGQUIT:
-#  - zsh 4.3.12 on Debian GNU/Linux
-#  - /bin/ksh and /usr/xpg4/bin/sh on Solaris 10
-#  - Bash 3.2.51 on Solaris 10 and bash 4.1.5 on Debian GNU/Linux
-#  - AT&T ksh on Debian Gnu/Linux (deb package ksh, version 93u-1)
-# OTOH, at least these shells that do *not* exhibit that behaviour:
-#  - modern version of the Almquist Shell (at least 0.5.5.1), on
-#    both Solaris and GNU/Linux
-#  - public domain Korn Shell, version 5.2.14, on Debian GNU/Linux
-trap "fatal_ 'caught signal SIGQUIT'" 3
-# Ignore further SIGPIPE in the trap code.  This is required to avoid
-# a very weird issue with some shells, at least when the execution of
-# the automake testsuite is driven by the 'prove' utility: if prove
-# (or the make process that has spawned it) gets interrupted with
-# Ctrl-C, the shell might go in a loop, continually getting a SIGPIPE,
-# sometimes finally dumping core, other times hanging indefinitely.
-# See also Test::Harness bug [rt.cpan.org #70855], archived at
-# <https://rt.cpan.org/Ticket/Display.html?id=70855>
-trap "trap '' 13; fatal_ 'caught signal SIGPIPE'" 13
-
-# Create and populate the temporary directory, if and as required.
-if test x"$am_create_testdir" = x"no"; then
-  am_test_subdir=
-else
+am_setup_testdir ()
+{
   # The subdirectory where the current test script will run and write its
   # temporary/data files.  This will be created shortly, and will be removed
   # by the cleanup trap below if the test passes.  If the test doesn't pass,
@@ -1000,12 +777,11 @@ else
       echo "AC_CONFIG_FILES([Makefile])"
     } >configure.ac || framework_failure_ "creating configure.ac skeleton"
   fi
-fi
-
-
-## ---------------- ##
-##  Ready to go...  ##
-## ---------------- ##
+}
 
-set -x
-pwd
+am_extra_info ()
+{
+  echo "Running from installcheck: $am_running_installcheck"
+  echo "Test Protocol: $am_test_protocol"
+  echo "PATH = $PATH"
+}
diff --git a/t/ax/plain-functions.sh b/t/ax/plain-functions.sh
deleted file mode 100644
index 6c5fef8..0000000
--- a/t/ax/plain-functions.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- shell-script -*-
-#
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Helper functions used by "plain" tests of the Automake testsuite
-# (i.e., tests that don't use any test protocol).
-
-# Print warnings (e.g., about skipped and failed tests) to this file
-# number.  Override by putting, say:
-#   AM_TESTS_ENVIRONMENT = stderr_fileno_=9; export stderr_fileno_;
-#   AM_TESTS_FD_REDIRECT = 9>&2
-# in your Makefile.am.
-# This is useful when using automake's parallel tests mode, to print the
-# reason for skip/failure to console, rather than to the *.log files.
-: ${stderr_fileno_=2}
-
-# Copied from Gnulib's 'tests/init.sh'.
-warn_ () { echo "$@" 1>&$stderr_fileno_; }
-fail_ () { warn_ "$me: failed test: $@"; exit 1; }
-skip_ () { warn_ "$me: skipped test: $@"; exit 77; }
-fatal_ () { warn_ "$me: hard error: $@"; exit 99; }
-framework_failure_ () { warn_ "$me: set-up failure: $@"; exit 99; }
-
-# For compatibility with TAP functions.
-skip_all_ () { skip_ "$@"; }
-
-:
diff --git a/t/ax/tap-setup.sh b/t/ax/tap-setup.sh
index 70487c3..952a49d 100644
--- a/t/ax/tap-setup.sh
+++ b/t/ax/tap-setup.sh
@@ -22,7 +22,7 @@
 
 # Check that we are running from a proper directory: last thing we want
 # is to overwrite some random user files.
-test -f ../../defs-static && test -f ../../defs && test -d ../../t \
+test -f ../../automake && test -f ../../defs && test -d ../../t \
   || fatal_ "running from a wrong directory"
 
 test ! -f Makefile.am || mv Makefile.am Makefile.am~ \
diff --git a/defs-static.in b/t/ax/test-defs.in
similarity index 73%
rename from defs-static.in
rename to t/ax/test-defs.in
index 6901212..56b45e1 100644
--- a/defs-static.in
+++ b/t/ax/test-defs.in
@@ -21,74 +21,15 @@
 # IMPORTANT NOTES AND REQUIREMENTS
 #   - Multiple inclusions of this file should be idempotent.
 #   - This code has to be 'set -e' clean.
-#   - This file should execute correctly with any system's /bin/sh
-#     shell, not only with configure-time detected $SHELL and/or
-#     $AM_TEST_RUNNER_SHELL.
-
-# CDPATH is evil if exported in the environment.
-CDPATH=; unset CDPATH
-
-# Be more Bourne compatible.
-# (Snippet inspired to configure's initialization in Autoconf 2.64)
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  setopt NO_GLOB_SUBST
-  # If Zsh is not started directly in POSIX-compatibility mode, it has some
-  # incompatibilities in the handling of $0 that conflict with our usage;
-  # i.e., $0 inside a file sourced with the '.' builtin is temporarily set
-  # to the name of the sourced file.  Work around that.
-  # Note that a bug in some versions of Zsh prevents us from resetting $0
-  # in a sourced script, so the use of $argv0.  For more info see:
-  #   <http://www.zsh.org/mla/workers/2009/msg01140.html>
-  # The apparently useless 'eval' here is needed by at least dash 0.5.2,
-  # to prevent it from bailing out with an error like:
-  #   "Syntax error: Bad substitution".
-  eval 'argv0=${functrace[-1]%:*}' && test -f "$argv0" || {
-    echo "Cannot determine the path of running test script." >&2
-    echo "Your Zsh (version $ZSH_VERSION) is probably too old." >&2
-    exit 99
-  }
-else
-  argv0=$0
-  # Avoid command substitution failure, for Tru64 sh -e and instspc*.test.
-  case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
-fi
-
-# The name of the current test (without the '.sh' or '.tap' suffix).
-me=${argv0##*/} # Strip all directory components.
-case $me in     # Strip test suffix.
-   *.tap) me=${me%.tap};;
-    *.sh) me=${me%.sh} ;;
- esac
-
-# Check that the environment is properly sanitized.
-# Having variables exported to the empty string is OK, since our code
-# treats such variables as if they were unset.
-for var in \
-  required \
-  am_using_tap \
-  am_serial_tests \
-  am_create_testdir \
-  am_tap_implementation \
-  am_test_prefer_config_shell \
-  am_original_AUTOMAKE \
-  am_original_ACLOCAL \
-; do
-  if eval "test x\"\$$var\" != x" && env | grep "^$var=" >/dev/null; then
-    echo "$me: variable '$var' is set in the environment:" \
-         "this is unsafe" >&2
-    exit 99
-  fi
-done
-unset var
 
 # See whether the current test script is expected to use TAP or not.
 # Use a sensible default, while allowing the scripts to override this
 # check.
-if test -z "$am_using_tap"; then
-  case $argv0 in *.tap) am_using_tap=yes;; *) am_using_tap=no;; esac
+if test -z "$am_test_protocol"; then
+  case $argv0 in
+    *.tap) am_test_protocol=tap;;
+        *) am_test_protocol=none;;
+  esac
 fi
 
 am_rel_srcdir='@srcdir@'
@@ -162,8 +103,8 @@ 
AUTOUPDATE=${AM_TESTSUITE_AUTOUPDATE-${AUTOUPDATE-'@am_AUTOUPDATE@'}}
 
 # Tests who want complete control over aclocal or automake command-line
 # options should use $am_original_ACLOCAL or $am_original_AUTOMAKE.  The
-# "test -z" tests take care not to re-initialize them if defs-static
-# is re-sourced, as we want defs-static to remain really idempotent.
+# "test -z" tests take care not to re-initialize them if 'test-defs.sh'
+# is re-sourced, as we want that file to remain really idempotent.
 if test -z "$am_original_AUTOMAKE"; then
   
am_original_AUTOMAKE=${AM_TESTSUITE_AUTOMAKE-${AUTOMAKE-"automake-$APIVERSION"}}
 fi
@@ -240,7 +181,4 @@ case $PATH in
   *) PATH=$am_bindir$PATH_SEPARATOR$PATH;;
 esac
 
-# Make our helper script accessible by default.
-PATH=$am_testauxdir$PATH_SEPARATOR$PATH
-
 export PATH
diff --git a/t/ax/test-lib.sh b/t/ax/test-lib.sh
new file mode 100644
index 0000000..6048f81
--- /dev/null
+++ b/t/ax/test-lib.sh
@@ -0,0 +1,296 @@
+# -*- shell-script -*-
+#
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+########################################################
+###  IMPORTANT NOTE: keep this file 'set -e' clean.  ###
+########################################################
+
+# Do not source several times.
+test ${test_lib_sourced-no} = yes && return 0
+test_lib_sourced=yes
+
+# CDPATH is evil if used in non-interactive scripts (and even more
+# evil if exported in the environment).
+CDPATH=; unset CDPATH
+
+# Be more Bourne compatible.
+# (Snippet inspired to configure's initialization in Autoconf 2.64)
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  setopt NO_GLOB_SUBST
+  # If Zsh is not started directly in POSIX-compatibility mode, it has some
+  # incompatibilities in the handling of $0 that conflict with our usage;
+  # i.e., $0 inside a file sourced with the '.' builtin is temporarily set
+  # to the name of the sourced file.  Work around that.
+  # Note that a bug in some versions of Zsh prevents us from resetting $0
+  # in a sourced script, so the use of $argv0.  For more info see:
+  #   <http://www.zsh.org/mla/workers/2009/msg01140.html>
+  # The apparently useless 'eval' here is needed by at least dash 0.5.2,
+  # to prevent it from bailing out with an error like:
+  #   "Syntax error: Bad substitution".
+  eval 'argv0=${functrace[-1]%:*}' && test -f "$argv0" || {
+    echo "Cannot determine the path of running test script." >&2
+    echo "Your Zsh (version $ZSH_VERSION) is probably too old." >&2
+    exit 99
+  }
+else
+  argv0=$0
+  # Avoid command substitution failure, for it might cause problems with
+  # "set -e" on some shells.
+  case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
+fi
+
+# A single whitespace character.
+sp=' '
+# A tabulation character.
+tab='  '
+# A newline character.
+nl='
+'
+
+# As autoconf-generated configure scripts do, ensure that IFS
+# is defined initially, so that saving and restoring $IFS works.
+IFS=$sp$tab$nl
+
+# The name of the current test (without the '.sh' or '.tap' suffix).
+me=${argv0##*/} # Strip all directory components.
+case $me in     # Strip test suffix.
+   *.tap) me=${me%.tap};;
+    *.sh) me=${me%.sh} ;;
+ esac
+
+# Source extra package-specific configuration.
+. test-defs.sh
+# And fail hard if something went wrong.
+test $? -eq 0 || exit 99
+
+# We use a trap below for cleanup.  This requires us to go through
+# hoops to get the right exit status transported through the signal.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function (FIXME: is this still relevant now that we
+# require a POSIX shell?).
+_am_exit ()
+{
+  set +e
+  # See comments in the exit trap for the reason we do this.
+  test 77 = $1 && am__test_skipped=yes
+  # Spurious escaping to ensure we do not call our 'exit' alias.
+  (\exit $1); \exit $1
+}
+# Avoid interferences from the environment
+am__test_skipped=no
+# This alias must actually be placed before any use if 'exit' -- even
+# just inside a function definition.  Weird, but real.
+alias exit=_am_exit
+
+## ------------------------------------ ##
+##  General testsuite shell functions.  ##
+## ------------------------------------ ##
+
+# Print warnings (e.g., about skipped and failed tests) to this file
+# number.  Override by putting, say:
+#   AM_TESTS_ENVIRONMENT = stderr_fileno_=9; export stderr_fileno_;
+#   AM_TESTS_FD_REDIRECT = 9>&2
+# in your Makefile.am.
+# This is useful when using automake's parallel tests mode, to print the
+# reason for skip/failure to console, rather than to the *.log files.
+: ${stderr_fileno_=2}
+
+# Helper functions used by "plain" tests of the Automake testsuite
+# (i.e., tests that don't use any test protocol).
+# TAP tests will override these functions with their TAP-enhanced
+# equivalents later  (see sourcing of 'tap-functions.sh' below).
+# These are copied from Gnulib's 'tests/init.sh'.
+warn_ () { echo "$@" 1>&$stderr_fileno_; }
+fail_ () { warn_ "$me: failed test: $@"; exit 1; }
+skip_ () { warn_ "$me: skipped test: $@"; exit 77; }
+fatal_ () { warn_ "$me: hard error: $@"; exit 99; }
+framework_failure_ () { warn_ "$me: set-up failure: $@"; exit 99; }
+# For compatibility with TAP functions.
+skip_all_ () { skip_ "$@"; }
+
+if test $am_test_protocol = tap; then
+  . tap-functions.sh
+fi
+
+## ---------------------------- ##
+##  Auxiliary shell functions.  ##
+## ---------------------------- ##
+
+# Tell whether we should keep the test directories around, even in
+# case of success.  By default, we don't.
+am_keeping_testdirs ()
+{
+  case $keep_testdirs in
+     ""|n|no|NO) return 1;;
+              *) return 0;;
+  esac
+}
+
+# seq_ - print a sequence of numbers
+# ----------------------------------
+# This function simulates GNU seq(1) portably.  Valid usages:
+#  - seq LAST
+#  - seq FIRST LAST
+#  - seq FIRST INCREMENT LAST
+seq_ ()
+{
+  case $# in
+    0) fatal_ "seq_: missing argument";;
+    1) seq_first=1  seq_incr=1  seq_last=$1;;
+    2) seq_first=$1 seq_incr=1  seq_last=$2;;
+    3) seq_first=$1 seq_incr=$2 seq_last=$3;;
+    *) fatal_ "seq_: too many arguments";;
+  esac
+  i=$seq_first
+  while test $i -le $seq_last; do
+    echo $i
+    i=$(($i + $seq_incr))
+  done
+}
+
+# rm_rf_ [FILES OR DIRECTORIES ...]
+# ---------------------------------
+# Recursively remove the given files or directory, also handling the case
+# of non-writable subdirectories.
+rm_rf_ ()
+{
+  test $# -gt 0 || return 0
+  # Ignore failures in find, we are only interested in failures of the
+  # final rm.
+  find "$@" -type d ! -perm -700 -exec chmod u+rwx {} \; || :
+  rm -rf "$@"
+}
+
+commented_sed_unindent_prog='
+  /^$/b                    # Nothing to do for empty lines.
+  x                        # Get x<indent> into pattern space.
+  /^$/{                    # No prior x<indent>, go prepare it.
+    g                      # Copy this 1st non-blank line into pattern space.
+    s/^\(['"$tab"' ]*\).*/x\1/   # Prepare x<indent> in pattern space.
+  }                        # Now: x<indent> in pattern and <line> in hold.
+  G                        # Build x<indent>\n<line> in pattern space, and
+  h                        # duplicate it into hold space.
+  s/\n.*$//                # Restore x<indent> in pattern space, and
+  x                        # exchange with the above duplicate in hold space.
+  s/^x\(.*\)\n\1//         # Remove leading <indent> from <line>.
+  s/^x.*\n//               # Restore <line> when there is no leading <indent>.
+'
+
+# unindent [input files...]
+# -------------------------
+# Remove the "proper" amount of leading whitespace from the given files,
+# and output the result on stdout.  That amount is determined by looking
+# at the leading whitespace of the first non-blank line in the input
+# files.  If no input file is specified, standard input is implied.
+unindent ()
+{
+  if test x"$sed_unindent_prog" = x; then
+    sed_unindent_prog=$(printf '%s\n' "$commented_sed_unindent_prog" \
+                          | sed -e "s/  *# .*//")
+  fi
+  sed "$sed_unindent_prog" ${1+"$@"}
+}
+sed_unindent_prog="" # Avoid interferences from the environment.
+
+## ---------------------------------------------------------------- ##
+##  Create and set up of the temporary directory used by the test.  ##
+##  Set up of the exit trap for cleanup of said directory.          ##
+## ---------------------------------------------------------------- ##
+
+# Set up the exit trap.
+am_exit_trap ()
+{
+  exit_status=$1
+  set +e
+  cd "$am_top_builddir"
+  if test $am_test_protocol = tap; then
+    if test "$planned_" = later && test $exit_status -eq 0; then
+      plan_ "now"
+    fi
+    test $exit_status -eq 0 && test $tap_pass_count_ -eq $tap_count_ \
+      || keep_testdirs=yes
+  else
+    # This is to ensure that a test script does give a SKIP outcome just
+    # because a command in it happens to exit with status 77.  This
+    # behaviour, while from time to time useful to developers, is not
+    # meant to be enabled by default, as it could cause spurious failures
+    # in the wild.  Thus it will be enabled only when the variable
+    # "am_explicit_skips" is set to a "true" value.
+    case $am_explicit_skips in
+      [yY]|[yY]es|1)
+        if test $exit_status -eq 77 && test $am__test_skipped != yes; then
+          echo "$me: implicit skip turned into failure"
+          exit_status=78
+        fi;;
+    esac
+    test $exit_status -eq 0 || keep_testdirs=yes
+  fi
+  am_keeping_testdirs || rm_rf_ $am_test_subdir
+  set +x
+  echo "$me: exit $exit_status"
+  # Spurious escaping to ensure we do not call our "exit" alias.
+  \exit $exit_status
+}
+
+am_set_exit_traps ()
+{
+  trap 'am_exit_trap $?' 0
+  trap "fatal_ 'caught signal SIGHUP'" 1
+  trap "fatal_ 'caught signal SIGINT'" 2
+  trap "fatal_ 'caught signal SIGTERM'" 15
+  # Various shells seems to just ignore SIGQUIT under some circumstances,
+  # even if the signal is not blocked; however, if the signal it trapped,
+  # the trap gets correctly executed.  So we also trap SIGQUIT.
+  # Here is a list of some shells that have been verified to exhibit the
+  # problematic behavior with SIGQUIT:
+  #  - zsh 4.3.12 on Debian GNU/Linux
+  #  - /bin/ksh and /usr/xpg4/bin/sh on Solaris 10
+  #  - Bash 3.2.51 on Solaris 10 and bash 4.1.5 on Debian GNU/Linux
+  #  - AT&T ksh on Debian Gnu/Linux (deb package ksh, version 93u-1)
+  # OTOH, at least these shells that do *not* exhibit that behaviour:
+  #  - modern version of the Almquist Shell (at least 0.5.5.1), on
+  #    both Solaris and GNU/Linux
+  #  - public domain Korn Shell, version 5.2.14, on Debian GNU/Linux
+  trap "fatal_ 'caught signal SIGQUIT'" 3
+  # Ignore further SIGPIPE in the trap code.  This is required to avoid
+  # a very weird issue with some shells, at least when the execution of
+  # the automake testsuite is driven by the 'prove' utility: if prove
+  # (or the make process that has spawned it) gets interrupted with
+  # Ctrl-C, the shell might go in a loop, continually getting a SIGPIPE,
+  # sometimes finally dumping core, other times hanging indefinitely.
+  # See also Test::Harness bug [rt.cpan.org #70855], archived at
+  # <https://rt.cpan.org/Ticket/Display.html?id=70855>
+  trap "trap '' 13; fatal_ 'caught signal SIGPIPE'" 13
+}
+
+am_test_setup ()
+{
+  process_requirements $required
+  am_set_exit_traps
+  # Create and populate the temporary directory, if required.
+  if test x"$am_create_testdir" = x"no"; then
+    am_test_subdir=
+  else
+    am_setup_testdir
+  fi
+  am_extra_info
+  set -x
+  pwd
+}
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index c31a658..6f1eeab 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -70,7 +70,6 @@ t/perf/testsuite-summary.sh
 handwritten_TESTS = \
 t/get-sysconf.sh \
 $(perl_TESTS) \
-$(perf_TESTS) \
 t/instspc.tap \
 t/aclocal.sh \
 t/aclocal3.sh \
@@ -949,7 +948,6 @@ t/repeated-options.sh \
 t/rulepat.sh \
 t/self-check-configure-help.sh \
 t/self-check-dir.tap \
-t/self-check-env-sanitize.tap \
 t/self-check-exit.tap \
 t/self-check-explicit-skips.sh \
 t/self-check-is_newest.tap \
@@ -957,7 +955,6 @@ t/self-check-me.tap \
 t/self-check-report.sh \
 t/self-check-seq.tap \
 t/self-check-is-blocked-signal.tap \
-t/self-check-tap.sh \
 t/self-check-unindent.tap \
 t/sanity.sh \
 t/scripts.sh \
diff --git a/t/primary-prefix-couples-force-valid.sh 
b/t/primary-prefix-couples-force-valid.sh
index 23b56c3..ac539a1 100755
--- a/t/primary-prefix-couples-force-valid.sh
+++ b/t/primary-prefix-couples-force-valid.sh
@@ -54,7 +54,12 @@ test:
        test -f '$(bindir)/libquux.a'
        ls -l '$(libexecdir)/bar.h'
        test -f '$(libexecdir)/bar.h'
-       test ! -x '$(libexecdir)/bar.h'
+## If this test is run as root, "test -x" could suceed also for
+## non-executable files, so we need to protect the next check.
+## See automake bug#12041.
+       if test -x Makefile; then echo SKIP THIS; else \
+         test ! -x '$(libexecdir)/bar.h'; \
+       fi;
 END
 
 cat > foo.c <<'END'
diff --git a/t/self-check-env-sanitize.tap b/t/self-check-env-sanitize.tap
deleted file mode 100755
index 3e48d89..0000000
--- a/t/self-check-env-sanitize.tap
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Sanity check for the automake testsuite.
-# Make sure that the testsuite initialization code complains when
-# some testsuite-influential variables are set in the environment.
-
-am_create_testdir=no
-. ./defs || exit 1
-
-set -x
-exec 5>&1
-
-plan_ 16 # Two times the number of variable names in $vars.
-
-vars='
-  required
-  am_serial_tests
-  am_using_tap
-  am_create_testdir
-  am_tap_implementation
-  am_test_prefer_config_shell
-  am_original_AUTOMAKE
-  am_original_ACLOCAL
-'
-
-do_run ()
-{
-  env "$1=foo" $AM_TEST_RUNNER_SHELL -c '. ./defs' foo.test
-}
-
-do_grep ()
-{
-  env "$1=foo" $AM_TEST_RUNNER_SHELL -c '. ./defs' foo.test 2>&1 1>&5 \
-    | grep "foo\.test:.* variable '$1'.* in the environment.*unsafe"
-}
-
-for var in $vars; do
-  command_ok_ "$var [err status]" not do_run $var
-  command_ok_ "$var [err message]" do_grep $var
-done
-
-:
diff --git a/t/self-check-tap.sh b/t/self-check-tap.sh
deleted file mode 100755
index d7f788c..0000000
--- a/t/self-check-tap.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Sanity check for the automake testsuite.
-# Make sure that $am_using_tap gets automatically defined by
-# './defs-static', but can be overridden by the individual tests.
-
-. ./defs-static || exit 1
-
-set -ex
-
-$AM_TEST_RUNNER_SHELL -c \
-  '. ./defs-static && test $am_using_tap = yes' foo.tap
-
-for name in foo.test tap tap.test foo-tap; do
-  $AM_TEST_RUNNER_SHELL -c \
-    '. ./defs-static && test $am_using_tap = no' $name
-done
-
-$AM_TEST_RUNNER_SHELL -c '
-  am_using_tap=no
-  . ./defs-static
-  test $am_using_tap = no
-' foo.tap
-
-$AM_TEST_RUNNER_SHELL -c '
-  am_using_tap=yes
-  . ./defs-static
-  test $am_using_tap = yes
-' foo.test
-
-:
diff --git a/t/tap-ambiguous-directive.sh b/t/tap-ambiguous-directive.sh
index 74f258f..aaf2cd0 100755
--- a/t/tap-ambiguous-directive.sh
+++ b/t/tap-ambiguous-directive.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..6
diff --git a/t/tap-autonumber.sh b/t/tap-autonumber.sh
index abc4ec8..876245e 100755
--- a/t/tap-autonumber.sh
+++ b/t/tap-autonumber.sh
@@ -22,7 +22,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..14
diff --git a/t/tap-bailout-and-logging.sh b/t/tap-bailout-and-logging.sh
index 5b49c33..f87ccb3 100755
--- a/t/tap-bailout-and-logging.sh
+++ b/t/tap-bailout-and-logging.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 First line
diff --git a/t/tap-bailout-leading-space.sh b/t/tap-bailout-leading-space.sh
index d0d3096..dfbadba 100755
--- a/t/tap-bailout-leading-space.sh
+++ b/t/tap-bailout-leading-space.sh
@@ -23,7 +23,7 @@
 am_tap_implementation=shell
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..1
diff --git a/t/tap-bailout-suppress-badexit.sh 
b/t/tap-bailout-suppress-badexit.sh
index c83ba8a..7cd5458 100755
--- a/t/tap-bailout-suppress-badexit.sh
+++ b/t/tap-bailout-suppress-badexit.sh
@@ -26,7 +26,7 @@ cat > Makefile.am <<END
 TESTS = $tests
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > exit.test << 'END'
 #!/bin/sh
diff --git a/t/tap-bailout-suppress-later-diagnostic.sh 
b/t/tap-bailout-suppress-later-diagnostic.sh
index 69ac88f..54e21fd 100755
--- a/t/tap-bailout-suppress-later-diagnostic.sh
+++ b/t/tap-bailout-suppress-later-diagnostic.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo AM_TEST_LOG_DRIVER_FLAGS = --comments >> Makefile
 
diff --git a/t/tap-bailout-suppress-later-errors.sh 
b/t/tap-bailout-suppress-later-errors.sh
index cd9aa14..bd90f8d 100755
--- a/t/tap-bailout-suppress-later-errors.sh
+++ b/t/tap-bailout-suppress-later-errors.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Various errors that can all be squashed into a single test script.
 cat > foo.test << 'END'
diff --git a/t/tap-bailout.sh b/t/tap-bailout.sh
index 91dfd24..08f12fd 100755
--- a/t/tap-bailout.sh
+++ b/t/tap-bailout.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 : > exp
 
diff --git a/t/tap-color.sh b/t/tap-color.sh
index 2fa45d1..a3fab2f 100755
--- a/t/tap-color.sh
+++ b/t/tap-color.sh
@@ -36,7 +36,7 @@ TESTS = all.test skip.test bail.test badplan.test noplan.test 
\
         few.test many.test order.test afterlate.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..5
diff --git a/t/tap-deps.sh b/t/tap-deps.sh
index ee76e93..8e84a63 100755
--- a/t/tap-deps.sh
+++ b/t/tap-deps.sh
@@ -26,7 +26,7 @@ b.log: a.log
 c.log: b.log
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test << 'END'
 #!/bin/sh
diff --git a/t/tap-diagnostic.sh b/t/tap-diagnostic.sh
index 10b4f5b..fc00af9 100755
--- a/t/tap-diagnostic.sh
+++ b/t/tap-diagnostic.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 metacharacters=\''"\$!&()[]<>#;^?*'
 
diff --git a/t/tap-empty-diagnostic.sh b/t/tap-empty-diagnostic.sh
index c92a152..ae0deef 100755
--- a/t/tap-empty-diagnostic.sh
+++ b/t/tap-empty-diagnostic.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 sed 's/\$$//' > all.test <<END
 1..1$
diff --git a/t/tap-empty.sh b/t/tap-empty.sh
index 976656d..e3d400c 100755
--- a/t/tap-empty.sh
+++ b/t/tap-empty.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Empty TAP input.
 : > empty.test
diff --git a/t/tap-escape-directive-2.sh b/t/tap-escape-directive-2.sh
index 3080663..49c6398 100755
--- a/t/tap-escape-directive-2.sh
+++ b/t/tap-escape-directive-2.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..8
diff --git a/t/tap-escape-directive.sh b/t/tap-escape-directive.sh
index 2fb1ad9..9b59c3d 100755
--- a/t/tap-escape-directive.sh
+++ b/t/tap-escape-directive.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..2
diff --git a/t/tap-exit.sh b/t/tap-exit.sh
index 0949384..c9a9823 100755
--- a/t/tap-exit.sh
+++ b/t/tap-exit.sh
@@ -34,7 +34,7 @@ done
 
 chmod a+x *.test
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 $MAKE check >stdout && { cat stdout; exit 1; }
 cat stdout
diff --git a/t/tap-fancy.sh b/t/tap-fancy.sh
index f879cce..9ca5021 100755
--- a/t/tap-fancy.sh
+++ b/t/tap-fancy.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 #
 # From manpage Test::Harness::TAP(3):
diff --git a/t/tap-fancy2.sh b/t/tap-fancy2.sh
index 88ef412..d69cf50 100755
--- a/t/tap-fancy2.sh
+++ b/t/tap-fancy2.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 #
 # From manpage Test::Harness::TAP(3):
diff --git a/t/tap-global-log.sh b/t/tap-global-log.sh
index 85db2cb..31e1ccb 100755
--- a/t/tap-global-log.sh
+++ b/t/tap-global-log.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > ok.test << 'END'
 1..5
diff --git a/t/tap-global-result.sh b/t/tap-global-result.sh
index ba232c3..528c7bb 100755
--- a/t/tap-global-result.sh
+++ b/t/tap-global-result.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > ok.test <<END
 1..3
diff --git a/t/tap-log.sh b/t/tap-log.sh
index 32cb475..2e92f21 100755
--- a/t/tap-log.sh
+++ b/t/tap-log.sh
@@ -29,7 +29,7 @@ TESTS = pass.test skip.test xfail.test fail.test xpass.test 
error.test
 TEST_SUITE_LOG = global.log
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Custom markers, for use in grepping checks.
 cmarker=::: # comment marker
diff --git a/t/tap-merge-stdout-stderr.sh b/t/tap-merge-stdout-stderr.sh
index 1fe4b85..b13d41d 100755
--- a/t/tap-merge-stdout-stderr.sh
+++ b/t/tap-merge-stdout-stderr.sh
@@ -27,7 +27,7 @@ AM_TEST_LOG_DRIVER_FLAGS = --comments --merge
 TESTS = all.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 #!/bin/sh
diff --git a/t/tap-missing-plan-and-bad-exit.sh 
b/t/tap-missing-plan-and-bad-exit.sh
index ddd74c8..06a6f88 100755
--- a/t/tap-missing-plan-and-bad-exit.sh
+++ b/t/tap-missing-plan-and-bad-exit.sh
@@ -30,7 +30,7 @@ echo TESTS = foo.test > Makefile.am
 
 chmod a+x foo.test
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 $MAKE check >stdout && { cat stdout; exit 1; }
 cat stdout
diff --git a/t/tap-msg0-bailout.sh b/t/tap-msg0-bailout.sh
index cf8918c..bdda865 100755
--- a/t/tap-msg0-bailout.sh
+++ b/t/tap-msg0-bailout.sh
@@ -21,7 +21,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo 'Bail out! 0' > a.test
 echo 'Bail out! 0.0' > b.test
diff --git a/t/tap-msg0-directive.sh b/t/tap-msg0-directive.sh
index 9859e72..9be3816 100755
--- a/t/tap-msg0-directive.sh
+++ b/t/tap-msg0-directive.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..3
diff --git a/t/tap-msg0-misc.sh b/t/tap-msg0-misc.sh
index 166b785..d7751d7 100755
--- a/t/tap-msg0-misc.sh
+++ b/t/tap-msg0-misc.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..14
diff --git a/t/tap-msg0-planskip.sh b/t/tap-msg0-planskip.sh
index 7602aff..24e569c 100755
--- a/t/tap-msg0-planskip.sh
+++ b/t/tap-msg0-planskip.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo '1..0 # SKIP 0' > a.test
 echo '1..0 # SKIP 0.0' > b.test
diff --git a/t/tap-msg0-result.sh b/t/tap-msg0-result.sh
index a1174bc..f55b055 100755
--- a/t/tap-msg0-result.sh
+++ b/t/tap-msg0-result.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..10
diff --git a/t/tap-negative-numbers.sh b/t/tap-negative-numbers.sh
index 765442a..fbf54be 100755
--- a/t/tap-negative-numbers.sh
+++ b/t/tap-negative-numbers.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..7
diff --git a/t/tap-no-disable-hard-error.sh b/t/tap-no-disable-hard-error.sh
index e9a1091..dc4cad3 100755
--- a/t/tap-no-disable-hard-error.sh
+++ b/t/tap-no-disable-hard-error.sh
@@ -26,7 +26,7 @@ TEST_LOG_COMPILER = cat
 TESTS = bail.test few.test noplan.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > bail.test <<END
 1..1
diff --git a/t/tap-no-merge-stdout-stderr.sh b/t/tap-no-merge-stdout-stderr.sh
index e82b26b..f101315 100755
--- a/t/tap-no-merge-stdout-stderr.sh
+++ b/t/tap-no-merge-stdout-stderr.sh
@@ -25,7 +25,7 @@ TEST_LOG_DRIVER_FLAGS = --comments
 TESTS = all.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 #!/bin/sh
diff --git a/t/tap-no-spurious-numbers.sh b/t/tap-no-spurious-numbers.sh
index 3f99498..81104af 100755
--- a/t/tap-no-spurious-numbers.sh
+++ b/t/tap-no-spurious-numbers.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > prefixes <<'END'
 A
diff --git a/t/tap-no-spurious-summary.sh b/t/tap-no-spurious-summary.sh
index 85e1bba..13c577c 100755
--- a/t/tap-no-spurious-summary.sh
+++ b/t/tap-no-spurious-summary.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..1
diff --git a/t/tap-no-spurious.sh b/t/tap-no-spurious.sh
index ebb58cf..bc98a09 100755
--- a/t/tap-no-spurious.sh
+++ b/t/tap-no-spurious.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo 1..5 > all.test
 
diff --git a/t/tap-not-ok-skip.sh b/t/tap-not-ok-skip.sh
index f73bb03..bbb9a03 100755
--- a/t/tap-not-ok-skip.sh
+++ b/t/tap-not-ok-skip.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..4
diff --git a/t/tap-number-wordboundary.sh b/t/tap-number-wordboundary.sh
index 219a159..2d15121 100755
--- a/t/tap-number-wordboundary.sh
+++ b/t/tap-number-wordboundary.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..5
diff --git a/t/tap-numbers-leading-zero.sh b/t/tap-numbers-leading-zero.sh
index fd1c3b6..620addf 100755
--- a/t/tap-numbers-leading-zero.sh
+++ b/t/tap-numbers-leading-zero.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 do_checks ()
 {
diff --git a/t/tap-numeric-description.sh b/t/tap-numeric-description.sh
index 60292a7..61bc252 100755
--- a/t/tap-numeric-description.sh
+++ b/t/tap-numeric-description.sh
@@ -18,7 +18,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Some random numbers to be used as test names.  The definitions below are
 # selected so that $x<n> != <n> for every n >= 1.  We can't use positional
diff --git a/t/tap-out-of-order.sh b/t/tap-out-of-order.sh
index e884a1e..ff0e806 100755
--- a/t/tap-out-of-order.sh
+++ b/t/tap-out-of-order.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..3
diff --git a/t/tap-passthrough-exit.sh b/t/tap-passthrough-exit.sh
index 7b800d5..f6507e0 100755
--- a/t/tap-passthrough-exit.sh
+++ b/t/tap-passthrough-exit.sh
@@ -38,7 +38,7 @@ END
   echo TESTS += exit-$e.test >> Makefile.am
 done
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 st=0
 $MAKE check || st=$?
diff --git a/t/tap-passthrough.sh b/t/tap-passthrough.sh
index 993e750..e2eae17 100755
--- a/t/tap-passthrough.sh
+++ b/t/tap-passthrough.sh
@@ -24,7 +24,7 @@
 
 weirdchars=\''"address@hidden&()[]<>#;,:.^?*/'
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 #
 # Only successful tests.
diff --git a/t/tap-plan-corner.sh b/t/tap-plan-corner.sh
index 86ba401..8fc0c7e 100755
--- a/t/tap-plan-corner.sh
+++ b/t/tap-plan-corner.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # -------------------------------------------------------------------------
 
diff --git a/t/tap-plan-errors.sh b/t/tap-plan-errors.sh
index 21fd013..4b6a410 100755
--- a/t/tap-plan-errors.sh
+++ b/t/tap-plan-errors.sh
@@ -25,7 +25,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 my_check ()
 {
diff --git a/t/tap-plan-leading-zero.sh b/t/tap-plan-leading-zero.sh
index 84047a6..dc1923c 100755
--- a/t/tap-plan-leading-zero.sh
+++ b/t/tap-plan-leading-zero.sh
@@ -21,7 +21,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..01
diff --git a/t/tap-plan-malformed.sh b/t/tap-plan-malformed.sh
index 68a0f47..cf43d47 100755
--- a/t/tap-plan-malformed.sh
+++ b/t/tap-plan-malformed.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..1 foo
diff --git a/t/tap-plan-middle.sh b/t/tap-plan-middle.sh
index 77f16a7..971869b 100755
--- a/t/tap-plan-middle.sh
+++ b/t/tap-plan-middle.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > top1.test <<END
 non-TAP line, ignored
diff --git a/t/tap-plan-whitespace.sh b/t/tap-plan-whitespace.sh
index 106cad0..5cc198f 100755
--- a/t/tap-plan-whitespace.sh
+++ b/t/tap-plan-whitespace.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 sed 's/\$$//' > foo.test <<END
 1..2 $
diff --git a/t/tap-plan.sh b/t/tap-plan.sh
index 40fc8c3..d222870 100755
--- a/t/tap-plan.sh
+++ b/t/tap-plan.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > top.test <<END
 1..3
diff --git a/t/tap-planskip-and-logging.sh b/t/tap-planskip-and-logging.sh
index 7c1e017..33e5f7f 100755
--- a/t/tap-planskip-and-logging.sh
+++ b/t/tap-planskip-and-logging.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo TEST_LOG_DRIVER_FLAGS = --comments >> Makefile
 
diff --git a/t/tap-planskip-badexit.sh b/t/tap-planskip-badexit.sh
index 1b20864..0bcc7e3 100755
--- a/t/tap-planskip-badexit.sh
+++ b/t/tap-planskip-badexit.sh
@@ -22,7 +22,7 @@
 
 echo TESTS = one.test two.test > Makefile.am
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > one.test <<'END'
 #!/bin/sh
diff --git a/t/tap-planskip-bailout.sh b/t/tap-planskip-bailout.sh
index 255443d..6558a69 100755
--- a/t/tap-planskip-bailout.sh
+++ b/t/tap-planskip-bailout.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..0 # SKIP
diff --git a/t/tap-planskip-case-insensitive.sh 
b/t/tap-planskip-case-insensitive.sh
index a67712b..ece3b25 100755
--- a/t/tap-planskip-case-insensitive.sh
+++ b/t/tap-planskip-case-insensitive.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # These nested loops below are clearer without indentation.
 i=0
diff --git a/t/tap-planskip-late.sh b/t/tap-planskip-late.sh
index af33733..678bd19 100755
--- a/t/tap-planskip-late.sh
+++ b/t/tap-planskip-late.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > foo.test <<END
 some non-TAP text, will be copied in the global log
diff --git a/t/tap-planskip-later-errors.sh b/t/tap-planskip-later-errors.sh
index 3a403c7..c840044 100755
--- a/t/tap-planskip-later-errors.sh
+++ b/t/tap-planskip-later-errors.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..0
diff --git a/t/tap-planskip-unplanned-corner.sh 
b/t/tap-planskip-unplanned-corner.sh
index 2ce4686..ef9ab3c 100755
--- a/t/tap-planskip-unplanned-corner.sh
+++ b/t/tap-planskip-unplanned-corner.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > foo.test <<END
 1..0 # SKIP
diff --git a/t/tap-planskip-unplanned.sh b/t/tap-planskip-unplanned.sh
index 01e5895..5fa8ca5 100755
--- a/t/tap-planskip-unplanned.sh
+++ b/t/tap-planskip-unplanned.sh
@@ -21,7 +21,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 ok 1
diff --git a/t/tap-planskip-whitespace.sh b/t/tap-planskip-whitespace.sh
index d9c5496..5ae9d3a 100755
--- a/t/tap-planskip-whitespace.sh
+++ b/t/tap-planskip-whitespace.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > foo.test <<END
 1..0${tab}${tab}   #${tab}SKIP  ${tab}Strip leading & trailing ${tab}${tab}
diff --git a/t/tap-planskip.sh b/t/tap-planskip.sh
index 9e6704b..76a7244 100755
--- a/t/tap-planskip.sh
+++ b/t/tap-planskip.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 weirdchars=\''"$!&()[]<>#;^?*/@%=,.:'
 
diff --git a/t/tap-realtime.sh b/t/tap-realtime.sh
index 97b035c..fcac95f 100755
--- a/t/tap-realtime.sh
+++ b/t/tap-realtime.sh
@@ -56,7 +56,7 @@ TESTS = all.test
 AM_COLOR_TESTS= no
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 #! /bin/sh
diff --git a/t/tap-recheck-logs.sh b/t/tap-recheck-logs.sh
index e774f73..1b7597e 100755
--- a/t/tap-recheck-logs.sh
+++ b/t/tap-recheck-logs.sh
@@ -25,7 +25,7 @@ TESTS = foo.test bar.test baz.test
 baz.log: zardoz
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 : > zardoz
 
diff --git a/t/tap-result-comment.sh b/t/tap-result-comment.sh
index 4290751..714f328 100755
--- a/t/tap-result-comment.sh
+++ b/t/tap-result-comment.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..5
diff --git a/t/tap-summary-color.sh b/t/tap-summary-color.sh
index a28512b..e9b516b 100755
--- a/t/tap-summary-color.sh
+++ b/t/tap-summary-color.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - colorized testsuite summary
 
-. ./defs-static
+. test-lib.sh
 
 use_colors=yes
-. "$am_testauxdir"/tap-summary-aux.sh
+. tap-summary-aux.sh
diff --git a/t/tap-summary.sh b/t/tap-summary.sh
index deee099..c4bd739 100755
--- a/t/tap-summary.sh
+++ b/t/tap-summary.sh
@@ -17,7 +17,7 @@
 # TAP support:
 #  - colorized testsuite summary
 
-. ./defs-static
+. test-lib.sh
 
 use_colors=no
-. "$am_testauxdir"/tap-summary-aux.sh
+. tap-summary-aux.sh
diff --git a/t/tap-test-number-0.sh b/t/tap-test-number-0.sh
index c085da0..f360349 100755
--- a/t/tap-test-number-0.sh
+++ b/t/tap-test-number-0.sh
@@ -43,7 +43,7 @@ if test $am_tap_implementation = perl; then
   fi
 fi
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..1
diff --git a/t/tap-todo-skip-together.sh b/t/tap-todo-skip-together.sh
index b54013a..dc9e160 100755
--- a/t/tap-todo-skip-together.sh
+++ b/t/tap-todo-skip-together.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..2
diff --git a/t/tap-todo-skip-whitespace.sh b/t/tap-todo-skip-whitespace.sh
index b9c8825..b979c8b 100755
--- a/t/tap-todo-skip-whitespace.sh
+++ b/t/tap-todo-skip-whitespace.sh
@@ -20,7 +20,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > stub.tap <<END
 1 # TODO
diff --git a/t/tap-todo-skip.sh b/t/tap-todo-skip.sh
index 81a8128..c4e47cf 100755
--- a/t/tap-todo-skip.sh
+++ b/t/tap-todo-skip.sh
@@ -25,7 +25,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # ----------------------------------------------------- #
 #  Check all possible combinations of:                  #
diff --git a/t/tap-unplanned.sh b/t/tap-unplanned.sh
index e00e4b8..75ad7bf 100755
--- a/t/tap-unplanned.sh
+++ b/t/tap-unplanned.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..1
diff --git a/t/tap-whitespace-normalization.sh 
b/t/tap-whitespace-normalization.sh
index 2b1f627..0cbf90b 100755
--- a/t/tap-whitespace-normalization.sh
+++ b/t/tap-whitespace-normalization.sh
@@ -144,7 +144,7 @@ END
 
 chmod a+x *.test
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Don't care about exit status or number of test results, they should be
 # checked for in many other tests.
diff --git a/t/tap-with-and-without-number.sh b/t/tap-with-and-without-number.sh
index c69a40a..6d69eb6 100755
--- a/t/tap-with-and-without-number.sh
+++ b/t/tap-with-and-without-number.sh
@@ -21,7 +21,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..7
diff --git a/t/tap-xfail-tests.sh b/t/tap-xfail-tests.sh
index aa86dca..94ae1c9 100755
--- a/t/tap-xfail-tests.sh
+++ b/t/tap-xfail-tests.sh
@@ -19,7 +19,7 @@
 
 . ./defs || exit 1
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo 'XFAIL_TESTS = $(TESTS)' >> Makefile
 
diff --git a/t/testsuite-summary-color.sh b/t/testsuite-summary-color.sh
index c73ca45..7278a2f 100755
--- a/t/testsuite-summary-color.sh
+++ b/t/testsuite-summary-color.sh
@@ -16,12 +16,10 @@
 
 # Check coloring of the testsuite summary.
 
-. ./defs-static || exit 1
+. test-lib.sh
 
-use_colors=yes
-use_vpath=no
-
-. "$am_testauxdir"/testsuite-summary-checks.sh || exit 99
+use_colors=yes; use_vpath=no
+. testsuite-summary-checks.sh
 
 ./configure
 
diff --git a/t/testsuite-summary-count.sh b/t/testsuite-summary-count.sh
index 265eebf..25ecf27 100755
--- a/t/testsuite-summary-count.sh
+++ b/t/testsuite-summary-count.sh
@@ -16,12 +16,10 @@
 
 # Check test counts in the testsuite summary.
 
-. ./defs-static || exit 1
+. test-lib.sh
 
-use_colors=no
-use_vpath=no
-
-. "$am_testauxdir"/testsuite-summary-checks.sh || exit 99
+use_colors=no; use_vpath=no
+. testsuite-summary-checks.sh
 
 ./configure
 


hooks/post-receive
-- 
GNU Automake



reply via email to

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