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.13.2-27


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.13.2-272-ga0db09f
Date: Thu, 23 May 2013 20:24:11 +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=a0db09fe9eb8b03415a5dd00ff031f5a17096108

The branch, master has been updated
       via  a0db09fe9eb8b03415a5dd00ff031f5a17096108 (commit)
       via  aba3b0abf71bcd600fcb142b307b9c6955205298 (commit)
       via  86e45fe19374b87b6a9adaeb3ecc93e51c7d54a7 (commit)
       via  3ce4015f1bfff6277840502b080cfd2b22e05870 (commit)
       via  e2a000cc181b4a66564b8378cad6843d1938f80a (commit)
       via  20963917dd4c0591f2983bd6a94426361bd53fa5 (commit)
       via  f2a1ef46193a8d1bccbb9c4b9e92b644bdb83add (commit)
       via  c8e1373ff89f7420bded109acb3c4c14ab45345b (commit)
       via  d9a3a4477bdc346f515786cf70568db25a167422 (commit)
       via  439ca6b342e56ab75c3e26866ed05b6b9850ac19 (commit)
       via  8d7108702485dca61841a642202b892f8038e15c (commit)
       via  15996acc36367acf3a653eea6e1fbec03b00a964 (commit)
       via  edbe522d6e9abe71a018d1323ae00f7e7c1625eb (commit)
       via  e958709f467eb459c83f9e92fb8bfceca94b5c21 (commit)
      from  baf8a1c22acce0908020210bcdd47f241ef00005 (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 HACKING                                    |    5 +++-
 lib/am/header-vars.am                      |    4 +-
 maintainer/syntax-checks.mk                |   11 +++++++++
 t/aclocal-amflags.sh                       |    3 +-
 t/aclocal-autoconf-version-check.sh        |    3 +-
 t/alpha.sh                                 |    5 ++-
 t/autohdr-subdir-pr12495.sh                |    3 +-
 t/ax/am-test-lib.sh                        |   32 +++++++++++++++++++++++++++
 t/ax/depcomp.sh                            |    3 +-
 t/ax/tap-summary-aux.sh                    |    8 ++----
 t/ax/testsuite-summary-checks.sh           |    3 +-
 t/built-sources-check.sh                   |    3 +-
 t/built-sources-fork-bomb.sh               |    7 +----
 t/ccnoco3.sh                               |    3 +-
 t/check-fd-redirect.sh                     |    5 +---
 t/check-tests-in-builddir.sh               |   29 +++++++++++-------------
 t/check10.sh                               |    2 +-
 t/check11.sh                               |    6 +---
 t/check2.sh                                |    3 +-
 t/check4.sh                                |   12 +++------
 t/check5.sh                                |    3 +-
 t/check7.sh                                |    3 +-
 t/check8.sh                                |    8 +-----
 t/colon6.sh                                |    3 +-
 t/color-tests.sh                           |    6 +---
 t/color-tests2.sh                          |   27 ++++++++++------------
 t/cond34.sh                                |   12 +++------
 t/cond37.sh                                |   12 +++------
 t/cond39.sh                                |    6 +---
 t/conff.sh                                 |   18 +++++----------
 t/conffile-leading-dot.sh                  |    3 +-
 t/cscope.tap                               |    3 +-
 t/dejagnu3.sh                              |    5 +--
 t/deleted-am.sh                            |    6 +---
 t/deleted-m4.sh                            |    6 +---
 t/dist-missing-am.sh                       |    3 +-
 t/dist-missing-included-m4.sh              |    3 +-
 t/dist-missing-m4.sh                       |    3 +-
 t/distcheck-configure-flags-am.sh          |    3 +-
 t/distcheck-configure-flags-subpkg.sh      |    3 +-
 t/distcheck-configure-flags.sh             |    3 +-
 t/distcheck-missing-m4.sh                  |    6 +---
 t/distcheck-outdated-m4.sh                 |    7 +----
 t/distcheck-pr10470.sh                     |    3 +-
 t/distcheck-pr9579.sh                      |    8 +-----
 t/distcleancheck.sh                        |    4 +--
 t/distdir.sh                               |    3 +-
 t/distlinksbrk.sh                          |    5 +--
 t/exeext.sh                                |    6 +---
 t/extra-deps-lt.sh                         |    3 +-
 t/extra-deps.sh                            |    3 +-
 t/fn99.sh                                  |    3 +-
 t/fn99subdir.sh                            |    3 +-
 t/fort2.sh                                 |    4 +--
 t/gnits2.sh                                |    5 ++-
 t/gnits3.sh                                |    5 ++-
 t/install-info-dir.sh                      |    3 +-
 t/instdir-java.sh                          |   13 +---------
 t/instdir-lisp.sh                          |   13 +---------
 t/instdir-ltlib.sh                         |   13 +---------
 t/instdir-no-empty.sh                      |    5 ++-
 t/instdir-prog.sh                          |   16 +-----------
 t/instdir-python.sh                        |   13 +---------
 t/instdir-texi.sh                          |   14 +----------
 t/instdir.sh                               |   13 +---------
 t/instdir2.sh                              |   13 +---------
 t/libtool7.sh                              |   20 ++++------------
 t/libtool9.sh                              |    8 +++---
 t/lisp7.sh                                 |    4 +--
 t/lisp8.sh                                 |    7 ++++-
 t/ltorder.sh                               |    3 +-
 t/make-is-gnu.sh                           |    3 +-
 t/make-keepgoing.tap                       |    2 +-
 t/maken3.sh                                |    3 +-
 t/output7.sh                               |    9 +++----
 t/parallel-tests-basics.sh                 |   21 ++++++-----------
 t/parallel-tests-cmdline-override.sh       |    3 +-
 t/parallel-tests-concurrency.sh            |    5 ++++
 t/parallel-tests-console-output.sh         |    3 +-
 t/parallel-tests-dry-run-2.sh              |    3 +-
 t/parallel-tests-empty.sh                  |    6 ++--
 t/parallel-tests-exit-statuses.sh          |    9 ++-----
 t/parallel-tests-extra-programs.sh         |   10 ++------
 t/parallel-tests-fd-redirect-exeext.sh     |    6 +---
 t/parallel-tests-fd-redirect.sh            |    5 +--
 t/parallel-tests-fork-bomb.sh              |    6 +---
 t/parallel-tests-log-override-2.sh         |    4 +--
 t/parallel-tests-log-override-recheck.sh   |   11 ++------
 t/parallel-tests-no-spurious-summary.sh    |    6 +---
 t/parallel-tests-recheck-depends-on-all.sh |    9 ++-----
 t/parallel-tests-recheck-pr11791.sh        |   22 ++++++-----------
 t/parallel-tests-recheck.sh                |    6 +---
 t/parallel-tests-reset-term.sh             |    8 +-----
 t/pluseq10.sh                              |    3 +-
 t/posixsubst-tests.sh                      |   11 ++++-----
 t/pr300-ltlib.sh                           |    6 +---
 t/preproc-demo.sh                          |    3 +-
 t/remake-aclocal-version-mismatch.sh       |    6 +---
 t/remake-subdir3.sh                        |    3 +-
 t/self-check-shell-no-trail-bslash.sh      |    3 +-
 t/silent-c.sh                              |    6 +---
 t/silent-custom.sh                         |    3 +-
 t/silent-cxx.sh                            |    8 +++---
 t/silent-f77.sh                            |    6 +---
 t/silent-f90.sh                            |    6 +---
 t/silent-gen.sh                            |   18 +++++----------
 t/silent-lex.sh                            |   12 +++------
 t/silent-lt.sh                             |    6 +---
 t/silent-many-languages.sh                 |    6 +---
 t/silent-nested-vars.sh                    |    6 +---
 t/silent-texi.sh                           |    9 +------
 t/silent-yacc-headers.sh                   |   24 ++++++-------------
 t/silent-yacc.sh                           |   12 +++------
 t/subobj9.sh                               |    6 +---
 t/subst-no-trailing-empty-line.sh          |    6 +---
 t/tap-ambiguous-directive.sh               |    4 +--
 t/tap-autonumber.sh                        |    3 +-
 t/tap-bad-prog.tap                         |    9 +------
 t/tap-bailout-leading-space.sh             |    5 +---
 t/tap-bailout-suppress-badexit.sh          |    5 +--
 t/tap-bailout-suppress-later-diagnostic.sh |    6 +----
 t/tap-bailout-suppress-later-errors.sh     |    5 +---
 t/tap-bailout.sh                           |    5 +---
 t/tap-basic.sh                             |   12 ++-------
 t/tap-color.sh                             |    6 +---
 t/tap-deps.sh                              |    4 +--
 t/tap-diagnostic-custom.sh                 |    6 +---
 t/tap-diagnostic.sh                        |   16 ++++---------
 t/tap-doc.sh                               |    3 +-
 t/tap-doc2.sh                              |    8 ++----
 t/tap-empty-diagnostic.sh                  |    3 +-
 t/tap-empty.sh                             |    3 +-
 t/tap-escape-directive-2.sh                |    4 +--
 t/tap-escape-directive.sh                  |    4 +--
 t/tap-exit.sh                              |    6 +---
 t/tap-fancy.sh                             |   13 +++-------
 t/tap-fancy2.sh                            |    3 +-
 t/tap-global-result.sh                     |    3 +-
 t/tap-log.sh                               |    3 +-
 t/tap-merge-stdout-stderr.sh               |   16 +++----------
 t/tap-missing-plan-and-bad-exit.sh         |    3 +-
 t/tap-more2.sh                             |    3 +-
 t/tap-msg0-bailout.sh                      |    4 +--
 t/tap-msg0-directive.sh                    |    4 +--
 t/tap-msg0-misc.sh                         |    4 +--
 t/tap-msg0-planskip.sh                     |    4 +--
 t/tap-msg0-result.sh                       |    4 +--
 t/tap-negative-numbers.sh                  |    4 +--
 t/tap-no-disable-hard-error.sh             |    4 +--
 t/tap-no-merge-stdout-stderr.sh            |    5 +--
 t/tap-no-spurious-numbers.sh               |    4 +--
 t/tap-no-spurious-summary.sh               |    4 +--
 t/tap-no-spurious.sh                       |    4 +--
 t/tap-not-ok-skip.sh                       |    4 +--
 t/tap-number-wordboundary.sh               |   12 ++-------
 t/tap-numbers-leading-zero.sh              |    3 +-
 t/tap-numeric-description.sh               |    4 +--
 t/tap-out-of-order.sh                      |    5 +---
 t/tap-plan-corner.sh                       |   22 ++++++------------
 t/tap-plan-errors.sh                       |    3 +-
 t/tap-plan-leading-zero.sh                 |    5 +---
 t/tap-plan-malformed.sh                    |    4 +--
 t/tap-plan-middle.sh                       |    4 +--
 t/tap-plan-whitespace.sh                   |    4 +--
 t/tap-plan.sh                              |    6 ++--
 t/tap-planskip-and-logging.sh              |    5 +---
 t/tap-planskip-badexit.sh                  |    3 +-
 t/tap-planskip-bailout.sh                  |    3 +-
 t/tap-planskip-case-insensitive.sh         |    4 +--
 t/tap-planskip-late.sh                     |    3 +-
 t/tap-planskip-later-errors.sh             |    4 +--
 t/tap-planskip-unplanned-corner.sh         |    4 +--
 t/tap-planskip-unplanned.sh                |   12 +++------
 t/tap-planskip-whitespace.sh               |    5 +---
 t/tap-planskip.sh                          |    6 +---
 t/tap-recheck-logs.sh                      |   15 ++++--------
 t/tap-recheck.sh                           |   11 ++++-----
 t/tap-result-comment.sh                    |    4 +--
 t/tap-signal.tap                           |    8 ++----
 t/tap-test-number-0.sh                     |    5 +---
 t/tap-todo-skip-together.sh                |    4 +--
 t/tap-todo-skip-whitespace.sh              |    4 +-
 t/tap-todo-skip.sh                         |    8 +-----
 t/tap-unplanned.sh                         |   15 ++++--------
 t/tap-whitespace-normalization.sh          |    7 ++---
 t/tap-with-and-without-number.sh           |    3 +-
 t/test-driver-acsubst.sh                   |    5 +--
 t/test-driver-custom-multitest-recheck.sh  |   11 ++++-----
 t/test-driver-custom-multitest-recheck2.sh |   33 +++++++--------------------
 t/test-driver-custom-multitest.sh          |    7 +----
 t/test-driver-custom-xfail-tests.sh        |    6 +---
 t/test-log.sh                              |    3 +-
 t/test-metadata-results.sh                 |   20 +++++++++-------
 t/test-missing.sh                          |   16 +++----------
 t/test-missing2.sh                         |    3 +-
 t/test-trs-recover.sh                      |   14 ++++-------
 t/test-trs-recover2.sh                     |    9 ++-----
 t/testsuite-summary-count-many.sh          |    2 +-
 t/testsuite-summary-reference-log.sh       |   15 ++++--------
 199 files changed, 485 insertions(+), 918 deletions(-)

diff --git a/HACKING b/HACKING
index fac35be..fdadada 100644
--- a/HACKING
+++ b/HACKING
@@ -121,7 +121,10 @@
 
 * Micro releases should be just bug-fixing releases; no new features
   should be added, and ideally, only trivial bugs, recent regressions,
-  or documentation issues should be addressed by them.
+  or documentation issues should be addressed by them.  On the other
+  hand, it's OK to include testsuite work and even testsuite refactoring
+  in a micro version, since a regression there is not going to annoy or
+  inconvenience Automake users, but only the Automake developers.
 
 * Minor releases can introduce new "safe" features, do non-trivial but
   mostly safe code clean-ups, and even add new runtime warnings (rigorously
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 1a6f28e..d25efa6 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -74,7 +74,7 @@ am__make_running_with_option = \
     case $$flg in \
       *=*|--*) continue;; \
 ##
-## GNU make 3.83 has changed the format of $MFLAGS, and removed the space
+## GNU make 4.0 has changed the format of $MFLAGS, and removed the space
 ## between an option and its argument (e.g., from "-I dir" to "-Idir").
 ## So we need to handle both formats, at least for options valid in GNU
 ## make.  OTOH, BSD make formats $(MAKEFLAGS) by separating all options,
@@ -84,7 +84,7 @@ am__make_running_with_option = \
 ## For GNU make and BSD make.
         -*I) strip_trailopt 'I'; skip_next=yes;; \
       -*I?*) strip_trailopt 'I';; \
-## For GNU make >= 3.83.
+## For GNU make >= 4.0.
         -*O) strip_trailopt 'O'; skip_next=yes;; \
       -*O?*) strip_trailopt 'O';; \
 ## For GNU make (possibly overkill, this one).
diff --git a/maintainer/syntax-checks.mk b/maintainer/syntax-checks.mk
index fefbcc7..9191757 100644
--- a/maintainer/syntax-checks.mk
+++ b/maintainer/syntax-checks.mk
@@ -62,6 +62,7 @@ sc_tests_no_source_defs \
 sc_tests_obsolete_variables \
 sc_tests_here_document_format \
 sc_tests_command_subst \
+sc_tests_no_run_make_redirect \
 sc_tests_exit_not_Exit \
 sc_tests_automake_fails \
 sc_tests_required_after_defs \
@@ -346,6 +347,16 @@ sc_tests_no_source_defs:
          exit 1; \
        fi
 
+## Invocation of 'run_make' should not have output redirections.
+sc_tests_no_run_make_redirect:
+       @if grep -Pzo '.*(\$$MAKE|\brun_make)\b(.*(\\\n))*.*>.*' $(xtests); \
+       then \
+         echo 'Do not redirect stdout/stderr in "run_make" or "$$MAKE"' \
+              'invocations,' >&2; \
+         echo 'use "run_make {-E|-O|-M}" instead.' >&2; \
+         exit 1; \
+       fi
+
 ## Use AUTOMAKE_fails when appropriate
 sc_tests_automake_fails:
        @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*exit'; then \
diff --git a/t/aclocal-amflags.sh b/t/aclocal-amflags.sh
index 10f0cb1..dddc5cf 100644
--- a/t/aclocal-amflags.sh
+++ b/t/aclocal-amflags.sh
@@ -66,8 +66,7 @@ $sleep
 sed 's/MACRO_FOO/MACRO_BAR/' configure.ac > t
 mv -f t configure.ac
 
-$MAKE Makefile >output 2>&1 || { cat output; exit 1; }
-cat output
+run_make -M Makefile
 grep "^aclocal.*:.*found macro.*MACRO_BAR.*m4_2/bar\.m4" output
 grep "macro.*MACRO_FOO" output && exit 1
 test ! -r foo
diff --git a/t/aclocal-autoconf-version-check.sh 
b/t/aclocal-autoconf-version-check.sh
index 29aee30..64910d0 100644
--- a/t/aclocal-autoconf-version-check.sh
+++ b/t/aclocal-autoconf-version-check.sh
@@ -43,8 +43,7 @@ sed 's/^dnl!! //' < configure.ac > configure.tmp
 cmp configure.ac configure.tmp && fatal_ 'failed to edit configure.ac'
 mv -f configure.tmp configure.ac
 
-$MAKE 2>stderr || { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E
 grep 'You have another version of autoconf' stderr
 grep 'aclocal.m4:.*this file was generated for autoconf 9999a' stderr
 
diff --git a/t/alpha.sh b/t/alpha.sh
index 5f01629..bbcc14b 100644
--- a/t/alpha.sh
+++ b/t/alpha.sh
@@ -60,11 +60,12 @@ $AUTOMAKE
 ./configure
 
 # "make distdir" should fail because NEWS does not mention 1.0a
-$MAKE check 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E -e FAIL check
 grep 'NEWS not updated' stderr
 test ! -e works
 
 echo 'alpha 1.0a released' > NEWS
 $MAKE check
 test -f works
+
+:
diff --git a/t/autohdr-subdir-pr12495.sh b/t/autohdr-subdir-pr12495.sh
index a7a6a6b..7e26b46 100644
--- a/t/autohdr-subdir-pr12495.sh
+++ b/t/autohdr-subdir-pr12495.sh
@@ -67,8 +67,7 @@ ocwd=$(pwd)
 for x in b c; do
   test $x = b || cd sub
   rm -f $x.h.in
-  $MAKE $x.h.in 2>stderr && { cat stderr >&2; exit 1; }
-  cat stderr >&2
+  run_make -E -e FAIL $x.h.in
   test ! -f $x.h.in
   if using_gmake; then
     grep "No rule to make target [\`\"']$x\.h\.in[\`\"']" stderr
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh
index 5c918db..542bbb5 100644
--- a/t/ax/am-test-lib.sh
+++ b/t/ax/am-test-lib.sh
@@ -373,6 +373,7 @@ grep_configure_help ()
   $EGREP "$2" am--our-help || exit 1
 }
 
+
 # using_gmake
 # -----------
 # Return success if $MAKE is GNU make, return failure otherwise.
@@ -483,6 +484,37 @@ am__useless_vpath_rebuild=""
 
 yl_distcheck () { useless_vpath_rebuild || run_make distcheck ${1+"$@"}; }
 
+
+null_install ()
+{
+  for am__v in nulldirs destdir instdir; do
+    if ! eval 'test -n "$'$am__v'"'; then
+      fatal_ "null_install() invoked with \$$am__v unset"
+    fi
+  done
+  unset am__v
+  case $#,$1 in
+    0,)
+      am__inst='install';;
+    1,-t|1,--texi)
+      am__inst='install install-html install-dvi install-ps install-pdf';;
+    *)
+      fatal_ "null_install(): invalid usage";;
+  esac
+  run_make $nulldirs $am__inst
+  test ! -e "$instdir"
+  run_make $nulldirs $am__inst DESTDIR="$destdir"
+  test ! -e "$instdir"
+  test ! -e "$destdir"
+  run_make -M $nulldirs uninstall
+  # Creative quoting below to please maintainer-check.
+  grep 'rm'' ' output && exit 1
+  run_make -M $nulldirs uninstall DESTDIR="$destdir"
+  # Creative quoting below to please maintainer-check.
+  grep 'rm'' ' output && exit 1
+  : # For 'set -e'.
+}
+
 # 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
diff --git a/t/ax/depcomp.sh b/t/ax/depcomp.sh
index 1534d5f..03b0b7e 100644
--- a/t/ax/depcomp.sh
+++ b/t/ax/depcomp.sh
@@ -160,8 +160,7 @@ case $depcomp_with_libtool in
     echo lib_LTLIBRARIES = libfoo.la >> Makefile.am
     make_ok ()
     {
-      $MAKE ${1+"$@"} >output 2>&1 || { cat output; return 1; }
-      cat output
+      run_make -M -- ${1+"$@"}
       $FGREP 'unknown directive' output && return 1
       rm -f output
       # Checks for stray files possibly left around by less common
diff --git a/t/ax/tap-summary-aux.sh b/t/ax/tap-summary-aux.sh
index 2270079..472c43f 100644
--- a/t/ax/tap-summary-aux.sh
+++ b/t/ax/tap-summary-aux.sh
@@ -53,7 +53,6 @@ do_check ()
   shift
   cat > summary.exp
   cat all.test
-  st=0
   if test $use_colors = yes; then
     # Forced colorization should take place also with non-ANSI terminals;
     # hence the "TERM=dumb" definition.
@@ -61,12 +60,11 @@ do_check ()
   else
     make_args=
   fi
-  run_make $make_args check > stdout || st=$?
-  cat stdout
+  run_make -O -e IGNORE $make_args check
   if test $expect_failure = yes; then
-    test $st -gt 0 || exit 1
+    test $am_make_rc_got -gt 0 || exit 1
   else
-    test $st -eq 0 || exit 1
+    test $am_make_rc_got -eq 0 || exit 1
   fi
   $PERL "$am_testaux_srcdir"/extract-testsuite-summary.pl stdout >summary.got \
     || fatal_ "cannot extract testsuite summary"
diff --git a/t/ax/testsuite-summary-checks.sh b/t/ax/testsuite-summary-checks.sh
index 94de72d..1b37134 100644
--- a/t/ax/testsuite-summary-checks.sh
+++ b/t/ax/testsuite-summary-checks.sh
@@ -74,8 +74,7 @@ do_check ()
     case $t in fail*|xpass*|error*) expect_failure=:;; esac
     case $t in xfail*|xpass*) xfail_tests="$xfail_tests $t";; esac
   done
-  run_make -e IGNORE check TESTS="$tests" XFAIL_TESTS="$xfail_tests" >stdout
-  cat stdout
+  run_make -O -e IGNORE check TESTS="$tests" XFAIL_TESTS="$xfail_tests"
   if $expect_failure; then
     test $am_make_rc_got -gt 0 || exit 1
   else
diff --git a/t/built-sources-check.sh b/t/built-sources-check.sh
index e528b70..9c81b0e 100644
--- a/t/built-sources-check.sh
+++ b/t/built-sources-check.sh
@@ -58,8 +58,7 @@ $AUTOCONF
 $AUTOMAKE -a
 ./configure --prefix "$(pwd)/inst"
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 grep '^PASS: subrun\.sh *$' stdout
 grep 'PASS.*echo\.sh' stdout && exit 1
 
diff --git a/t/built-sources-fork-bomb.sh b/t/built-sources-fork-bomb.sh
index 72dafa3..4807d35 100644
--- a/t/built-sources-fork-bomb.sh
+++ b/t/built-sources-fork-bomb.sh
@@ -55,15 +55,12 @@ $AUTOCONF
 
 ./configure
 
-$MAKE -n foo >output 2>&1 || { cat output; exit 1; }
-cat output
+run_make -M -- -n foo
 test ! -f foo
 # Guard against possible infinite recursion.
 $FGREP '::OOPS::' output && exit 1
 
-$MAKE foo >output 2>&1 || { cat output; exit 1; }
-cat output
-$MAKE foo
+run_make -M -- foo
 # Guard against possible infinite recursion.
 $FGREP '::OOPS::' output && exit 1
 
diff --git a/t/ccnoco3.sh b/t/ccnoco3.sh
index baf3bdf..36bff76 100644
--- a/t/ccnoco3.sh
+++ b/t/ccnoco3.sh
@@ -53,8 +53,7 @@ mkdir build
 cd build
 
 ../configure
-$MAKE 2>stderr || { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E
 grep 'mv.*the same file' stderr && exit 1
 
 :
diff --git a/t/check-fd-redirect.sh b/t/check-fd-redirect.sh
index 661c59a..80f7867 100644
--- a/t/check-fd-redirect.sh
+++ b/t/check-fd-redirect.sh
@@ -46,10 +46,7 @@ do_check ()
   cat foo.test # For debugging.
   echo 'this line will be removed' > four
   echo 'this line will not be removed' > five
-  st=0
-  echo 'ok ok ok' | $MAKE check >stdout 2>stderr || st=1
-  cat stdout
-  cat stderr >&2
+  st=0; echo 'ok ok ok' | run_make -O -E -e IGNORE check || st=$?
   cat four
   test x"$am_serial_tests" = x"yes" || cat foo.log
   test $st -eq 0
diff --git a/t/check-tests-in-builddir.sh b/t/check-tests-in-builddir.sh
index 1c41368..2d71f70 100644
--- a/t/check-tests-in-builddir.sh
+++ b/t/check-tests-in-builddir.sh
@@ -52,41 +52,38 @@ exit 0
 END
 chmod a+x bar.test
 
-$MAKE check >out 2>&1 || { cat out; exit 1; }
-cat out
+run_make -M check
 # The serial test driver does not strip VPATH components from
 # the name of the test, but the parallel driver should.
 if test x"$am_serial_tests" = x"yes"; then
-  grep '^PASS: .*foo\.test *$' out
+  grep '^PASS: .*foo\.test *$' output
 else
-  grep '\.\./foo' out && exit 1
-  grep '^PASS: foo\.test *$' out
+  grep '\.\./foo' output && exit 1
+  grep '^PASS: foo\.test *$' output
 fi
-grep '^PASS: bar\.test *$' out
+grep '^PASS: bar\.test *$' output
 
 rm -f test-suite.log foo.log bar.log
 
-FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; exit 1; }
-cat out
+run_make -M -e FAIL FOO_EXIT_STATUS=1 check
 # The serial test driver does not strip VPATH components from
 # the name of the test, but the parallel driver should.
 if test x"$am_serial_tests" = x"yes"; then
-  grep '^FAIL: .*foo\.test *$' out
+  grep '^FAIL: .*foo\.test *$' output
 else
-  grep '\.\./foo' out && exit 1
-  grep '^FAIL: foo\.test *$' out
+  grep '\.\./foo' output && exit 1
+  grep '^FAIL: foo\.test *$' output
 fi
-grep '^PASS: bar\.test *$' out
+grep '^PASS: bar\.test *$' output
 
 rm -f test-suite.log foo.log bar.log
 
 # Check that if the same test is present in srcdir and builddir,
 # the one in builddir is preferred.
 cp bar.test foo.test
-FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 || { cat out; exit 1; }
-cat out
-grep '^PASS: foo\.test *$' out
-grep '^PASS: bar\.test *$' out
+run_make -M FOO_EXIT_STATUS=1 check
+grep '^PASS: foo\.test *$' output
+grep '^PASS: bar\.test *$' output
 
 # The tests in the builddir must be preferred also by "make dist".
 FOO_EXIT_STATUS=1 $MAKE distcheck
diff --git a/t/check10.sh b/t/check10.sh
index 3bb180b..75de991 100644
--- a/t/check10.sh
+++ b/t/check10.sh
@@ -55,7 +55,7 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-( 
+(
   run_make -e IGNORE TESTS=pass check
   run_make -e IGNORE TESTS=fail check
   run_make -e IGNORE TESTS=skip check
diff --git a/t/check11.sh b/t/check11.sh
index 3526d84..6be5aad 100644
--- a/t/check11.sh
+++ b/t/check11.sh
@@ -40,8 +40,7 @@ $AUTOMAKE -a
 
 ./configure
 
-run_make TESTS=skip check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O TESTS=skip check
 if test x"$am_serial_tests" = x"yes"; then
   grep '1.*passed' stdout && exit 1
   : For shells with buggy 'set -e'.
@@ -49,8 +48,7 @@ else
   count_test_results total=1 pass=0 fail=0 skip=1 xfail=0 xpass=0 error=0
 fi
 
-run_make TESTS="skip skip2" check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O TESTS="skip skip2" check
 if test x"$am_serial_tests" = x"yes"; then
   grep '2.*passed' stdout && exit 1
   : For shells with buggy 'set -e'.
diff --git a/t/check2.sh b/t/check2.sh
index 03fa8b9..835fff6 100644
--- a/t/check2.sh
+++ b/t/check2.sh
@@ -51,8 +51,7 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 grep '^PASS: subrun\.sh *$' stdout
 grep 'PASS.*echo\.sh' stdout && exit 1
 
diff --git a/t/check4.sh b/t/check4.sh
index dc34a38..42a7b0c 100644
--- a/t/check4.sh
+++ b/t/check4.sh
@@ -51,21 +51,18 @@ $AUTOMAKE --add-missing
 
 ./configure --prefix "$(pwd)/inst"
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL -- check
 grep '^FAIL: fail\.sh *$' stdout
 grep '^PASS: ok\.sh *$' stdout && exit 1
 
 # The exit status of 'make -k' can be anything
 # (depending on the Make implementation)
-$MAKE -k check >stdout || :
-cat stdout
+run_make -O -e IGNORE -- -k check
 grep '^FAIL: fail\.sh *$' stdout
 grep '^PASS: ok\.sh *$' stdout
 
 # Should also works when -k is not in first position.
-$MAKE -s -k check >stdout || :
-cat stdout
+run_make -O -e IGNORE -- -s -k check
 grep '^FAIL: fail\.sh *' stdout
 grep '^PASS: ok\.sh *' stdout
 
@@ -75,8 +72,7 @@ if using_gmake; then
   # Try with a long-option that do not have a short option equivalent
   # (here, --no-print-directory).  That should cause all options to
   # appear verbatim in MAKEFLAGS.
-  $MAKE --no-print-directory -k check >stdout || :
-  cat stdout
+  run_make -e FAIL -O -- --no-print-directory -k check
   grep '^FAIL: fail\.sh *$' stdout
   grep '^PASS: ok\.sh *$' stdout
 fi
diff --git a/t/check5.sh b/t/check5.sh
index a708839..738b3a1 100644
--- a/t/check5.sh
+++ b/t/check5.sh
@@ -52,8 +52,7 @@ cp one.c two.c
 ./configure
 $MAKE check
 test -f ok
-run_make EXEEXT=.bin print-tests >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O EXEEXT=.bin print-tests
 $FGREP 'BEG: one.bin two.bin :END' stdout
 # No am__EXEEXT_* variable is needed.
 grep '_EXEEXT_[1-9]' Makefile.in && exit 1
diff --git a/t/check7.sh b/t/check7.sh
index 5575f95..1dd918b 100644
--- a/t/check7.sh
+++ b/t/check7.sh
@@ -60,8 +60,7 @@ $AUTOMAKE -a
 
 ./configure
 $MAKE check
-run_make EXEEXT=.bin print-xfail-tests >stdout || {  cat stdout; exit 1; }
-cat stdout
+run_make -O EXEEXT=.bin print-xfail-tests
 $FGREP 'BEG: a.bin b c.bin d.bin :END' stdout
 
 $MAKE distcheck
diff --git a/t/check8.sh b/t/check8.sh
index 743d1bd..41fe307 100644
--- a/t/check8.sh
+++ b/t/check8.sh
@@ -64,10 +64,7 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-AM_COLOR_TESTS=always $MAKE check >stdout 2>stderr &&
-  { cat stdout; cat stderr >&2; exit 1; }
-cat stdout
-cat stderr >&2
+run_make -E -O -e FAIL check
 grep 'XPASS.* foo$' stdout
 grep '^[^X]*PASS.* sub/foo$' stdout
 grep '^[^X]*PASS.* bar' stdout
@@ -84,8 +81,7 @@ $MAKE distclean
 mkdir build
 cd build
 ../configure
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 # Note: we are not grepping for the space in the lines from the 'foo'
 # tests, due to the Solaris make VPATH rewriting (if we fix that, we
 # can still write a separate test for it).
diff --git a/t/colon6.sh b/t/colon6.sh
index bad9fad..fe34584 100644
--- a/t/colon6.sh
+++ b/t/colon6.sh
@@ -87,8 +87,7 @@ for vpath in : false; do
 
   # version.good should depend on version.gin.
   rm -f version.good
-  $MAKE version.good >output 2>&1 && { cat output; exit 1; }
-  cat output
+  run_make -M -e FAIL version.good
   # Try to verify that we errored out for the right reason.
   $FGREP version.gin output
 
diff --git a/t/color-tests.sh b/t/color-tests.sh
index 9a0d435..3ddef99 100644
--- a/t/color-tests.sh
+++ b/t/color-tests.sh
@@ -135,13 +135,11 @@ for vpath in false :; do
   # Forced colorization should take place also with non-ANSI terminals;
   # hence the "TERM=dumb" definition.
   AM_COLOR_TESTS=always; export AM_COLOR_TESTS
-  run_make TERM=dumb check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -e FAIL -O TERM=dumb check
   test_color
 
   unset AM_COLOR_TESTS
-  run_make TERM=ansi check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -e FAIL -O TERM=ansi check
   test_no_color
 
   $MAKE distclean
diff --git a/t/color-tests2.sh b/t/color-tests2.sh
index 09ebff9..6dcd207 100644
--- a/t/color-tests2.sh
+++ b/t/color-tests2.sh
@@ -152,6 +152,13 @@ test_no_color ()
   fi
 }
 
+our_make ()
+{
+  set "MAKE=$MAKE" ${1+"$@"}
+  env "$@" expect -f $srcdir/expect-make >stdout || { cat stdout; exit 1; }
+  cat stdout
+}
+
 cat >expect-make <<'END'
 eval spawn $env(MAKE) -e check
 expect eof
@@ -169,31 +176,21 @@ for vpath in false :; do
 
   $srcdir/configure
 
-  TERM=ansi MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  our_make TERM=ansi
   test_color
 
-  TERM=dumb MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  our_make TERM=dumb
   test_no_color
 
-  AM_COLOR_TESTS=no MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  our_make AM_COLOR_TESTS=no
   test_no_color
 
   $srcdir/configure testsuite_colorized=false
 
-  TERM=ansi MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  our_make TERM=ansi
   test_no_color
 
-  TERM=ansi MAKE="env AM_COLOR_TESTS=always $MAKE" \
-    expect -f $srcdir/expect-make >stdout || { cat stdout; exit 1; }
-  cat stdout
+  our_make TERM=ansi MAKE="env AM_COLOR_TESTS=always $MAKE"
   test_color
 
   $MAKE distclean
diff --git a/t/cond34.sh b/t/cond34.sh
index ea78a71..995aab9 100644
--- a/t/cond34.sh
+++ b/t/cond34.sh
@@ -54,22 +54,18 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-$MAKE dep-test1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O dep-test1
 $FGREP 'BEG: one.z somethingelse.a :END' stdout
 
-$MAKE dep-test2 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O dep-test2
 $FGREP 'BEG: three.z :END' stdout
 
 ./configure two=2
 
-$MAKE dep-test1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O dep-test1
 $FGREP 'BEG: two.z somethingelse.a :END' stdout
 
-$MAKE dep-test2 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O dep-test2
 $FGREP 'BEG: two.z somethingelse.a :END' stdout
 
 :
diff --git a/t/cond37.sh b/t/cond37.sh
index 18beca1..4295937 100644
--- a/t/cond37.sh
+++ b/t/cond37.sh
@@ -39,19 +39,15 @@ $AUTOCONF
 $AUTOMAKE
 
 ./configure
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 grep GrepMe1 stdout && exit 1
-$MAKE install >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O install
 grep GrepMe2 stdout
 
 ./configure case_A=1
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 grep GrepMe1 stdout
-$MAKE install >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O install
 grep GrepMe2 stdout && exit 1
 
 :
diff --git a/t/cond39.sh b/t/cond39.sh
index 3e33d00..819b014 100644
--- a/t/cond39.sh
+++ b/t/cond39.sh
@@ -78,8 +78,7 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 
 ./configure COND=true
-$MAKE 2>stderr || { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E
 grep 'overriding commands' stderr && exit 1
 $MAKE sure-exist
 ./prog1 && exit 1
@@ -93,8 +92,7 @@ $MAKE sure-exist
 $MAKE distclean
 
 ./configure COND=false
-$MAKE 2>stderr || { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E
 grep 'overriding commands' stderr && exit 1
 ./prog1
 ./sub/prog2
diff --git a/t/conff.sh b/t/conff.sh
index 450d7be..bebed77 100644
--- a/t/conff.sh
+++ b/t/conff.sh
@@ -47,11 +47,9 @@ $AUTOMAKE
 $MAKE
 
 cd bar
-$MAKE top-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O top-rule
 grep 'top rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O bot-rule
 grep 'bot rule' stdout
 cd ..
 
@@ -64,11 +62,9 @@ END
 $MAKE
 
 cd bar
-$MAKE top-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O top-rule
 grep 'top2 rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O bot-rule
 grep 'bot rule' stdout
 cd ..
 
@@ -81,11 +77,9 @@ END
 $MAKE
 
 cd bar
-$MAKE top-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O top-rule
 grep 'top2 rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O bot-rule
 grep 'bot2 rule' stdout
 cd ..
 
diff --git a/t/conffile-leading-dot.sh b/t/conffile-leading-dot.sh
index 6c6e57a..aebeea5 100644
--- a/t/conffile-leading-dot.sh
+++ b/t/conffile-leading-dot.sh
@@ -54,8 +54,7 @@ $sleep
 touch Makefile.am
 # Check that remake rules do truly break -- otherwise automake is
 # giving a bogus warning.
-$MAKE 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -e FAIL -E
 grep "config\\.status:.*invalid argument.*Makefile" stderr
 
 :
diff --git a/t/cscope.tap b/t/cscope.tap
index 29feec2..88d498b 100644
--- a/t/cscope.tap
+++ b/t/cscope.tap
@@ -105,8 +105,7 @@ test_cscope ()
   fi
 
   r=ok
-  $MAKE cscope 2>stderr || r='not ok'
-  cat stderr >&2
+  run_make -E cscope || r='not ok'
   grep 'cannot find file' stderr && r='not ok'
   rm -f stderr
   result_ "$r" "[$pfx] make cscope"
diff --git a/t/dejagnu3.sh b/t/dejagnu3.sh
index 8aac44f..576edc7 100644
--- a/t/dejagnu3.sh
+++ b/t/dejagnu3.sh
@@ -62,9 +62,8 @@ $MAKE distcheck
 
 # Ensure that the envvar RUNTESTFLAGS is used.
 # Report from Mark Mitchell.
-RUNTESTFLAGS=--unknown-runtest-option $MAKE check >output 2>&1 \
-  && { cat output; exit 1; }
-cat output
+RUNTESTFLAGS=--unknown-runtest-option; export RUNTESTFLAGS
+run_make -M -e FAIL check
 $FGREP 'unknown-runtest-option' output
 
 :
diff --git a/t/deleted-am.sh b/t/deleted-am.sh
index 5e066b3..980a27a 100644
--- a/t/deleted-am.sh
+++ b/t/deleted-am.sh
@@ -36,8 +36,7 @@ $MAKE
 
 rm -f zardoz.am
 $sleep # Required to avoid racy failures with FreeBSD make.
-$MAKE >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -e FAIL -M
 # This error will come from automake, not make, so we can be stricter
 # in our grepping of it.
 grep 'cannot open.*zardoz\.am' output
@@ -50,8 +49,7 @@ $AUTOMAKE Makefile
 $MAKE # Sanity check.
 rm -f foobar.am
 $sleep # Required to avoid racy failures with FreeBSD make.
-$MAKE >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -e FAIL -M
 # This error will come from automake, not make, so we can be stricter
 # in our grepping of it.
 grep 'cannot open.*foobar\.am' output
diff --git a/t/deleted-m4.sh b/t/deleted-m4.sh
index 15ee1de..1f4f7a9 100644
--- a/t/deleted-m4.sh
+++ b/t/deleted-m4.sh
@@ -39,8 +39,7 @@ $AUTOMAKE
 $MAKE
 
 rm -f zardoz.m4
-$MAKE >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -e FAIL -M
 # This error will come from aclocal, not make, so we can be stricter
 # in our grepping of it.
 grep ' foobar\.m4:1:.*zardoz\.m4.*does not exist' output
@@ -54,8 +53,7 @@ $AUTOCONF
 ./configure
 $MAKE # Sanity check.
 rm -f foobar.m4
-$MAKE >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -e FAIL -M
 # This error will come from aclocal, not make, so we can be stricter
 # in our grepping of it.
 grep 'foobar\.m4.*does not exist' output
diff --git a/t/dist-missing-am.sh b/t/dist-missing-am.sh
index 86d513b..dd074bd 100644
--- a/t/dist-missing-am.sh
+++ b/t/dist-missing-am.sh
@@ -54,8 +54,7 @@ for vpath in false :; do
     cd $distdir
     ./configure
   fi
-  $MAKE >output 2>&1 && { cat output; exit 1; }
-  cat output
+  run_make -e FAIL -M
   # This error comes from automake, not make, so we can be stricter
   # in our grepping of it.
   grep 'cannot open.*zardoz\.am' output
diff --git a/t/dist-missing-included-m4.sh b/t/dist-missing-included-m4.sh
index c4c7e5a..e14a38e 100644
--- a/t/dist-missing-included-m4.sh
+++ b/t/dist-missing-included-m4.sh
@@ -56,8 +56,7 @@ for vpath in false :; do
     cd $distdir
     ./configure
   fi
-  $MAKE >output 2>&1 && { cat output; exit 1; }
-  cat output
+  run_make -e FAIL -M
   # This error will come from automake, not make, so we can be stricter
   # in our grepping of it.
   grep 'zardoz\.m4.*does not exist' output
diff --git a/t/dist-missing-m4.sh b/t/dist-missing-m4.sh
index 411c400..2a4b4eb 100644
--- a/t/dist-missing-m4.sh
+++ b/t/dist-missing-m4.sh
@@ -59,8 +59,7 @@ for vpath in false :; do
     cd $distdir
     ./configure
   fi
-  $MAKE >output 2>&1 && { cat output; exit 1; }
-  cat output
+  run_make -e FAIL -M
   # This error will come from autoconf, not make, so we can be stricter
   # in our grepping of it.
   grep 'possibly undefined .*MY_ZARDOZ' output
diff --git a/t/distcheck-configure-flags-am.sh 
b/t/distcheck-configure-flags-am.sh
index b1fd49b..0d9a8d5 100644
--- a/t/distcheck-configure-flags-am.sh
+++ b/t/distcheck-configure-flags-am.sh
@@ -59,8 +59,7 @@ END
 $AUTOMAKE Makefile
 ./config.status Makefile
 
-$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -e FAIL -M distcheck
 grep "^configure:.* success='no', sentence='it works :-)'" output
 
 $MAKE distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes"
diff --git a/t/distcheck-configure-flags-subpkg.sh 
b/t/distcheck-configure-flags-subpkg.sh
index 24e8453..4693907 100644
--- a/t/distcheck-configure-flags-subpkg.sh
+++ b/t/distcheck-configure-flags-subpkg.sh
@@ -74,8 +74,7 @@ $MAKE distcheck
 
 # ... but not when "make distcheck" is run from the subpackage.
 cd subpkg
-$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -e FAIL -M distcheck
 grep '^configure:.* dc=KO am_dc=KO' output
 
 :
diff --git a/t/distcheck-configure-flags.sh b/t/distcheck-configure-flags.sh
index dece1c4..3674e03 100644
--- a/t/distcheck-configure-flags.sh
+++ b/t/distcheck-configure-flags.sh
@@ -48,8 +48,7 @@ $MAKE distcheck \
   DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes sentence='it works :-)'"
 
 # Sanity check.
-$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -M -e FAIL distcheck
 grep "^configure:.* success='no', sentence=''" output
 
 :
diff --git a/t/distcheck-missing-m4.sh b/t/distcheck-missing-m4.sh
index e430c62..ee492fd 100644
--- a/t/distcheck-missing-m4.sh
+++ b/t/distcheck-missing-m4.sh
@@ -74,8 +74,7 @@ check_no_spurious_error ()
 
 ./configure
 
-$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -M -e FAIL distcheck
 for x in bar baz zar; do
   $EGREP "required m4 file.*not distributed.* $x.m4( |$)" output
 done
@@ -100,8 +99,7 @@ END
 $MAKE
 $EGREP 'MY_(FOO|BAR|BAZ|QUX|ZAR|BLA)' configure && exit 1 # Sanity check.
 
-$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -M -e FAIL distcheck
 $EGREP "required m4 file.*not distributed.* qux.m4( |$)" output
 $EGREP "required m4 file.*not distributed.* bla.m4( |$)" output
 check_no_spurious_error
diff --git a/t/distcheck-outdated-m4.sh b/t/distcheck-outdated-m4.sh
index a078f31..84a08f4 100644
--- a/t/distcheck-outdated-m4.sh
+++ b/t/distcheck-outdated-m4.sh
@@ -79,9 +79,7 @@ AC_DEFUN([MY_ZARDOZ], [:])
 END
 
 $MAKE # Rebuild configure and makefiles.
-$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
-cat output
-
+run_make -M -e FAIL distcheck
 $EGREP "required m4 file.* outdated.* baz.m4( |$)" output
 check_no_spurious_error
 # Check that we don't complain for files that aren't outdated.
@@ -121,8 +119,7 @@ AC_DEFUN([MY_FNORD], [:])
 END
 
 $MAKE # Rebuild configure and makefiles.
-$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -M -e FAIL distcheck
 $EGREP "required m4 file.* outdated.* fnord.m4( |$)" output
 check_no_spurious_error
 # Check that we don't complain for files that aren't outdated.
diff --git a/t/distcheck-pr10470.sh b/t/distcheck-pr10470.sh
index a8e68c4..f6cb160 100644
--- a/t/distcheck-pr10470.sh
+++ b/t/distcheck-pr10470.sh
@@ -49,8 +49,7 @@ $AUTOMAKE
 ./configure
 
 # We can build the distribution.
-$MAKE distcheck >output 2>&1 || { cat output; exit 1; }
-cat output
+run_make -M -e FAIL distcheck
 # Sanity check: verify that our code has hit a problem removing
 # the distdir, but has recovered from it.
 grep "rm:.*$destdir" output || fatal_ "expected code path not covered"
diff --git a/t/distcheck-pr9579.sh b/t/distcheck-pr9579.sh
index 176e76d..b822e5c 100644
--- a/t/distcheck-pr9579.sh
+++ b/t/distcheck-pr9579.sh
@@ -54,9 +54,7 @@ $MAKE uninstall
 test -f inst/share/dir
 rm -rf inst
 
-$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
-cat output
-
+run_make -M -e FAIL distcheck
 $FGREP 'ERROR: files left after uninstall:' output
 grep '/share/dir *$' output
 
@@ -86,9 +84,7 @@ test -f inst/mu/share/info/dir
 test -f inst/share/info/more/dir
 rm -rf inst
 
-$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
-cat output
-
+run_make -M -e FAIL distcheck
 $FGREP 'ERROR: files left after uninstall:' output
 grep '/mu/share/info/dir *$' output
 grep '/share/info/more/dir *$' output
diff --git a/t/distcleancheck.sh b/t/distcleancheck.sh
index 5e5bb9e..b91d835 100644
--- a/t/distcleancheck.sh
+++ b/t/distcleancheck.sh
@@ -62,9 +62,7 @@ mv -f t Makefile.am
 $AUTOMAKE
 ./configure
 $MAKE
-$MAKE distcheck 2>stderr && { cat srderr >&2; exit 1; }
-cat stderr >&2
-
+run_make -E -e FAIL distcheck
 grep 'ERROR:.*files left in build directory after distclean' stderr
 grep '^\./foo\.1$' stderr
 
diff --git a/t/distdir.sh b/t/distdir.sh
index 94de0d2..4d1410d 100644
--- a/t/distdir.sh
+++ b/t/distdir.sh
@@ -68,8 +68,7 @@ test -d foo && exit 1
 
 rm -rf $me-1.0
 # Remove the dot from VERSION for the next grep.
-run_make -e IGNORE VERSION=10 MKDIR_P='echo MKDIR_P' distdir >stdout
-cat stdout
+run_make -O -e IGNORE VERSION=10 MKDIR_P='echo MKDIR_P' distdir
 
 # Make sure no './' appear in the directory names.  srcdir is '..', so
 # this also checks that no directory is created in the source tree.
diff --git a/t/distlinksbrk.sh b/t/distlinksbrk.sh
index 825884e..d2b3d0f 100644
--- a/t/distlinksbrk.sh
+++ b/t/distlinksbrk.sh
@@ -60,9 +60,8 @@ for lnk in $lnk1 $lnk2 $lnka $lnkb; do
   $AUTOMAKE
   ./configure
   # Distribution must fail, with a decent error message.
-  $MAKE distdir >out 2>&1 && { cat out; exit 1; }
-  cat out
-  $FGREP $lnk out
+  run_make -M -e FAIL distdir
+  $FGREP $lnk output
 done
 
 :
diff --git a/t/exeext.sh b/t/exeext.sh
index 604e9a5..7290233 100644
--- a/t/exeext.sh
+++ b/t/exeext.sh
@@ -69,8 +69,7 @@ grep 'maude3__EXEEXT__OBJECTS' Makefile.in && exit 1
 
 ./configure
 
-run_make EXEEXT=.foo print > stdout
-cat stdout
+run_make -O EXEEXT=.foo print
 
 grep '1BEG: maude.foo mt.foo :END1' stdout
 grep '2BEG: maude.static.foo :END2' stdout
@@ -79,8 +78,7 @@ grep '4BEG: rmt.foo :END4' stdout
 
 ./configure revert=yes
 
-run_make EXEEXT=.foo print > stdout
-cat stdout
+run_make -O EXEEXT=.foo print
 
 grep '1BEG: maude.foo :END1' stdout
 grep '2BEG: maude.static.foo :END2' stdout
diff --git a/t/extra-deps-lt.sh b/t/extra-deps-lt.sh
index 8d4af44..0950941 100644
--- a/t/extra-deps-lt.sh
+++ b/t/extra-deps-lt.sh
@@ -68,8 +68,7 @@ $AUTOCONF
 : >foodep
 : >foodep2
 : >bardep
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 grep 'making libfoodep' stdout
 
 rm -f bardep
diff --git a/t/extra-deps.sh b/t/extra-deps.sh
index 3bd6d1d..6446b57 100644
--- a/t/extra-deps.sh
+++ b/t/extra-deps.sh
@@ -78,8 +78,7 @@ $AUTOCONF
 : >foodep
 : >foodep2
 : >bardep
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 grep 'making libfoodep' stdout
 
 rm -f foodep
diff --git a/t/fn99.sh b/t/fn99.sh
index e98d0fd..c01eac1 100644
--- a/t/fn99.sh
+++ b/t/fn99.sh
@@ -43,8 +43,7 @@ $MAKE distcheck
   mkdir -p 12345678 && cd 12345678 && touch x || exit 1
 done) || skip_ "failed to create deeper directory hierarchy"
 
-$MAKE dist 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E -e FAIL dist
 grep 'filenames are too long' stderr
 test 2 -eq $(grep -c 12345678 stderr)
 
diff --git a/t/fn99subdir.sh b/t/fn99subdir.sh
index 9ef09ef..7b11db3 100644
--- a/t/fn99subdir.sh
+++ b/t/fn99subdir.sh
@@ -73,8 +73,7 @@ for i in 1 2 3 4 5 6 7 8 9; do
   mkdir -p 12345678 && cd 12345678 && touch x || exit 1
 done) || skip_ "failed to create deeper directory hierarchy"
 
-$MAKE dist 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E -e FAIL dist
 grep 'filenames are too long' stderr
 test 1 -eq $(grep -c 12345678 stderr)
 
diff --git a/t/fort2.sh b/t/fort2.sh
index bed0323..e5b6b76 100644
--- a/t/fort2.sh
+++ b/t/fort2.sh
@@ -66,10 +66,8 @@ $AUTOCONF
 touch hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 greets.f08 \
       sub/bonjour.f08 bye.f95 sub/baz.f90
 
-$MAKE -n \
+run_make -O -- -n \
   address@hidden address@hidden address@hidden address@hidden \
-  > stdout || { cat stdout; exit 1; }
-cat stdout
 # To make it easier to have stricter grepping below.
 $PERL -e '
   undef $/;
diff --git a/t/gnits2.sh b/t/gnits2.sh
index 98e92e4..b1bf520 100644
--- a/t/gnits2.sh
+++ b/t/gnits2.sh
@@ -107,8 +107,9 @@ cd build
 ../configure "--prefix=$(pwd)/../inst-dir" --program-prefix=p
 $MAKE all
 $MAKE test-install
-$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
-cat stderr >&2
+# Don't trust th exit status of "make -k" for non-GNU makes.
+if using_gmake; then status=FAIL; else status=IGNORE; fi
+run_make -e $status -E -- -k installcheck
 $MAKE grep-stderr
 
 :
diff --git a/t/gnits3.sh b/t/gnits3.sh
index 097fe8f..eb7f9a7 100644
--- a/t/gnits3.sh
+++ b/t/gnits3.sh
@@ -87,8 +87,9 @@ cd build
 $MAKE
 $MAKE install
 $MAKE installcheck && exit 1
-$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
-cat stderr >&2
+# Don't trust th exit status of "make -k" for non-GNU makes.
+if using_gmake; then status=FAIL; else status=IGNORE; fi
+run_make -e $status -E -- -k installcheck
 $MAKE grep-stderr
 
 # Make sure there is no more error when all targets are exempted.
diff --git a/t/install-info-dir.sh b/t/install-info-dir.sh
index 8bb7401..b16824f 100644
--- a/t/install-info-dir.sh
+++ b/t/install-info-dir.sh
@@ -118,8 +118,7 @@ echo error from install-info >&2
 exit 127
 END
 chmod a+x bin/install-info
-$MAKE install-info >output 2>&1 || { cat output; exit 1; }
-cat output
+run_make -M install-info
 test -f $instdir/info/foo.info
 test ! -e $instdir/info/dir
 grep 'error from install-info' output && exit 1
diff --git a/t/instdir-java.sh b/t/instdir-java.sh
index 547ec5f..1356f24 100644
--- a/t/instdir-java.sh
+++ b/t/instdir-java.sh
@@ -45,16 +45,7 @@ cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-nukedirs='javadir='
-
-run_make $nukedirs install
-test ! -e "$instdir"
-run_make $nukedirs install DESTDIR="$destdir"
-test ! -e "$instdir"
-test ! -e "$destdir"
-run_make $nukedirs uninstall > stdout || { cat stdout; exit 1; }
-cat stdout
-grep 'rm -f' stdout && exit 1
-run_make $nukedirs uninstall DESTDIR="$destdir"
+nulldirs='javadir='
+null_install
 
 :
diff --git a/t/instdir-lisp.sh b/t/instdir-lisp.sh
index 9760557..b37e6fe 100644
--- a/t/instdir-lisp.sh
+++ b/t/instdir-lisp.sh
@@ -42,16 +42,7 @@ cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-nukedirs='lispdir='
-
-run_make $nukedirs install
-test ! -e "$instdir"
-run_make $nukedirs install DESTDIR="$destdir"
-test ! -e "$instdir"
-test ! -e "$destdir"
-run_make $nukedirs uninstall > stdout || { cat stdout; exit 1; }
-cat stdout
-grep 'rm -f' stdout && exit 1
-run_make $nukedirs uninstall DESTDIR="$destdir"
+nulldirs='lispdir='
+null_install
 
 :
diff --git a/t/instdir-ltlib.sh b/t/instdir-ltlib.sh
index 4b54cab..92e8440 100644
--- a/t/instdir-ltlib.sh
+++ b/t/instdir-ltlib.sh
@@ -67,16 +67,7 @@ cd build
              am_cv_python_pythondir="$instdir/python" \
              am_cv_python_pyexecdir="$instdir/pyexec"
 
-nukedirs='bindir= libdir= pyexecdir='
-
-run_make $nukedirs install
-test ! -e "$instdir"
-run_make $nukedirs install DESTDIR="$destdir"
-test ! -e "$instdir"
-test ! -e "$destdir"
-run_make $nukedirs uninstall > stdout || { cat stdout; exit 1; }
-cat stdout
-grep 'rm -f' stdout && exit 1
-run_make $nukedirs uninstall DESTDIR="$destdir"
+nulldirs='bindir= libdir= pyexecdir='
+null_install
 
 :
diff --git a/t/instdir-no-empty.sh b/t/instdir-no-empty.sh
index 03e1862..4c311e5 100644
--- a/t/instdir-no-empty.sh
+++ b/t/instdir-no-empty.sh
@@ -111,8 +111,9 @@ $MAKE uninstall
 doinst bin_SCRIPTS=foo.sh
 test -f inst/bin/foo.sh
 
-./configure
-doinst DESTDIR="$cwd/dest"
+# Explicitly pass prefix to avoid spurious influences from
+# global config.site scripts.
+./configure --prefix="/usr/local"
 test ! -e dest || { find dest; exit 1; }
 $MAKE uninstall
 doinst DESTDIR="$cwd/dest" bin_SCRIPTS=foo.sh
diff --git a/t/instdir-prog.sh b/t/instdir-prog.sh
index b5a8add..73296f5 100644
--- a/t/instdir-prog.sh
+++ b/t/instdir-prog.sh
@@ -66,19 +66,7 @@ cd build
              am_cv_python_pythondir="$instdir/python" \
              am_cv_python_pyexecdir="$instdir/pyexec"
 
-nukedirs='bindir= libdir= pyexecdir='
-
-run_make $nukedirs install
-test ! -e "$instdir"
-run_make $nukedirs install DESTDIR="$destdir"
-test ! -e "$instdir"
-test ! -e "$destdir"
-run_make $nukedirs uninstall > stdout \
-  || { cat stdout; exit 1; }
-cat stdout
-# Creative quoting below to please maintainer-check.
-grep 'rm'' ' stdout && exit 1
-run_make $nukedirs uninstall DESTDIR="$destdir" > stdout \
-  || { cat stdout; exit 1; }
+nulldirs='bindir= libdir= pyexecdir='
+null_install
 
 :
diff --git a/t/instdir-python.sh b/t/instdir-python.sh
index e431a06..2bd4014 100644
--- a/t/instdir-python.sh
+++ b/t/instdir-python.sh
@@ -46,16 +46,7 @@ cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-nukedirs='pythondir='
-
-run_make $nukedirs install
-test ! -e "$instdir"
-run_make $nukedirs install DESTDIR="$destdir"
-test ! -e "$instdir"
-test ! -e "$destdir"
-run_make $nukedirs uninstall > stdout || { cat stdout; exit 1; }
-cat stdout
-grep 'rm -f' stdout && exit 1
-run_make $nukedirs uninstall DESTDIR="$destdir"
+nulldirs='pythondir='
+null_install
 
 :
diff --git a/t/instdir-texi.sh b/t/instdir-texi.sh
index 5cdaddb..6f30419 100644
--- a/t/instdir-texi.sh
+++ b/t/instdir-texi.sh
@@ -56,17 +56,7 @@ cd build
 $MAKE all dvi ps pdf html
 ls -l
 
-nukedirs='infodir= htmldir= dvidir= psdir= pdfdir='
-
-run_make $nukedirs install install-html install-dvi install-ps install-pdf
-test ! -e "$instdir"
-run_make $nukedirs install install-html install-dvi install-ps install-pdf \
-                   DESTDIR="$destdir"
-test ! -e "$instdir"
-test ! -e "$destdir"
-run_make $nukedirs uninstall > stdout || { cat stdout; exit 1; }
-cat stdout
-grep 'rm -f' stdout && exit 1
-run_make $nukedirs uninstall DESTDIR="$destdir"
+nulldirs='infodir= htmldir= dvidir= psdir= pdfdir='
+null_install --texi
 
 :
diff --git a/t/instdir.sh b/t/instdir.sh
index bd5915b..872f3dc 100644
--- a/t/instdir.sh
+++ b/t/instdir.sh
@@ -55,16 +55,7 @@ cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-nukedirs='bindir= datadir= includedir= foodir= bardir= man1dir=  man2dir='
-
-run_make $nukedirs install
-test ! -e "$instdir"
-run_make $nukedirs install DESTDIR="$destdir"
-test ! -e "$instdir"
-test ! -e "$destdir"
-run_make $nukedirs uninstall > stdout || { cat stdout; exit 1; }
-cat stdout
-grep 'rm -f' stdout && exit 1
-run_make $nukedirs uninstall DESTDIR="$destdir"
+nulldirs='bindir= datadir= includedir= foodir= bardir= man1dir= man2dir='
+null_install
 
 :
diff --git a/t/instdir2.sh b/t/instdir2.sh
index 78a8acc..1848591 100644
--- a/t/instdir2.sh
+++ b/t/instdir2.sh
@@ -77,16 +77,7 @@ cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-nukedirs='bindir= datadir= includedir= foodir= bardir= man1dir=  man2dir='
-
-run_make $nukedirs install
-test ! -e "$instdir"
-run_make $nukedirs install DESTDIR="$destdir"
-test ! -e "$instdir"
-test ! -e "$destdir"
-run_make $nukedirs uninstall > stdout || { cat stdout; exit 1; }
-cat stdout
-grep 'rm -f' stdout && exit 1
-run_make $nukedirs uninstall DESTDIR="$destdir"
+nulldirs='bindir= datadir= includedir= foodir= bardir= man1dir= man2dir='
+null_install
 
 :
diff --git a/t/libtool7.sh b/t/libtool7.sh
index f08ed2b..2a5b62b 100644
--- a/t/libtool7.sh
+++ b/t/libtool7.sh
@@ -79,30 +79,20 @@ $AUTOCONF
 $AUTOMAKE --add-missing --copy
 
 ./configure "--prefix=$(pwd)/_inst"
-env LIBTOOLFLAGS=--silent $MAKE print >output 2>&1 || {
-  cat output
-  exit 1
-}
-cat output
+
+run_make -M print LIBTOOLFLAGS=--silent
 grep '1BEG: libmod1.la mod2.la :END1' output
 grep '2BEG: mod2.la :END2' output
 grep '3BEG: .*silent.*silent.* :END3' output
 test 2 -le $(grep mod2_la_LIBTOOLFLAGS Makefile | wc -l)
+
 $MAKE
 
-env LIBTOOLFLAGS=--silent $MAKE install >output 2>&1 || {
-  cat output
-  exit 1
-}
-cat output
+run_make -M install LIBTOOLFLAGS=--silent
 grep 'silent.*silent.*prg' output
 grep 'silent.*silent.*libmod1' output
 
-env LIBTOOLFLAGS=--silent $MAKE uninstall >output 2>&1 || {
-  cat output
-  exit 1
-}
-cat output
+run_make -M uninstall LIBTOOLFLAGS=--silent
 grep 'silent.*silent.*libmod1' output
 
 :
diff --git a/t/libtool9.sh b/t/libtool9.sh
index 69bd72c..411d2bb 100644
--- a/t/libtool9.sh
+++ b/t/libtool9.sh
@@ -84,15 +84,14 @@ $AUTOCONF
 $AUTOMAKE --add-missing --copy
 
 ./configure
-run_make \
+run_make -M -- print \
   LDFLAGS=ldflags \
   AM_LDFLAGS=am_ldflags \
   libmod1_la_LDFLAGS=lm1_la_ldflags \
   CFLAGS=cflags \
   AM_CFLAGS=am_cflags \
-  prg2_CFLAGS=prg2_cflags \
-  print >output 2>&1 || { cat output; exit 1; }
-cat output
+  prg2_CFLAGS=prg2_cflags
+
 grep '1BEG: libmod1.la mod2.la :END1' output
 grep '2BEG: mod2.la :END2' output
 grep '3BEG:.* am_cflags cflags .*lm1_la_ldflags ldflags.* :END3' output
@@ -101,6 +100,7 @@ grep '4BEG: :END4' output
 grep '5BEG: :END5' output
 grep '6BEG:.* prg2_cflags cflags .*am_ldflags ldflags.* :END6' output
 grep '6BEG: .*am_cflags.* :END6' output && exit 1
+
 $MAKE
 
 :
diff --git a/t/lisp7.sh b/t/lisp7.sh
index da461ac..b58059b 100644
--- a/t/lisp7.sh
+++ b/t/lisp7.sh
@@ -37,9 +37,7 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 ./configure
 
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O
 test ! -e am-one.elc
 test ! -e am-two.elc
 test ! -e am-three.elc
diff --git a/t/lisp8.sh b/t/lisp8.sh
index d68d467..efb785c 100644
--- a/t/lisp8.sh
+++ b/t/lisp8.sh
@@ -38,9 +38,10 @@ $AUTOMAKE --add-missing
 ./configure
 
 # Use append mode here to avoid dropping output.  See automake bug#11413.
+# TODO: port this to to run_make(), and rewrite this hunk to use that
+#       function ...
 : >stdout
 $MAKE -j >>stdout || { cat stdout; exit 1; }
-
 cat stdout
 
 test -f am-one.elc
@@ -50,10 +51,12 @@ test -f am-three.elc
 rm -f am-*.elc
 
 # Use append mode here to avoid dropping output.  See automake bug#11413.
+# TODO: port this to to run_make(), and rewrite this hunk to use that
+#       function ...
 : >stdout
 $MAKE -j >>stdout || { cat stdout; exit 1; }
-
 cat stdout
+
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
diff --git a/t/ltorder.sh b/t/ltorder.sh
index c243ac7..de87274 100644
--- a/t/ltorder.sh
+++ b/t/ltorder.sh
@@ -53,8 +53,7 @@ $AUTOMAKE --add-missing
 ./configure --prefix="$(pwd)/inst"
 
 $MAKE
-$MAKE install 2>stderr || { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E install
 grep 'has not been installed' stderr && exit 1
 
 $MAKE uninstall
diff --git a/t/make-is-gnu.sh b/t/make-is-gnu.sh
index 79397da..a4b7faa 100644
--- a/t/make-is-gnu.sh
+++ b/t/make-is-gnu.sh
@@ -52,8 +52,7 @@ fi
 
 rm -f ok ko
 
-$MAKE -s file >output 2>&1
-cat output
+run_make -M -- -s file
 if using_gmake; then
  test -f ok
  test ! -e ko
diff --git a/t/make-keepgoing.tap b/t/make-keepgoing.tap
index f9db028..a595eeb 100644
--- a/t/make-keepgoing.tap
+++ b/t/make-keepgoing.tap
@@ -85,7 +85,7 @@ check_make k-n
 # Test against a possible regressions similar to those that affected
 # detection of dry mode ("make -n").
 check_make k-n TESTS="k.test k2.test"
-check_make k-n TESTS="k1 k k2" AM_MAKEFLAGS="TESTS='k1 k2'"
+check_make k-n TESTS="k1 k2" AM_MAKEFLAGS="TESTS='k1 k2'"
 check_make k-n TESTS="k1 k k2" AM_MAKEFLAGS='TESTS="k1 k k2"'
 check_make k-n FOOFLAGS="-k -k -nkf2 k -ks --keep -k"
 check_make k-n MYFLAGS="-k --keepgoing -k --keep-run -k"
diff --git a/t/maken3.sh b/t/maken3.sh
index ae4b219..171d716 100644
--- a/t/maken3.sh
+++ b/t/maken3.sh
@@ -142,8 +142,7 @@ check_targets ()
     install-info install-html install-dvi install-pdf install-ps \
     installcheck installdirs tags mostlyclean maintainer-clean
   do
-    $MAKE -n $target >stdout || { cat stdout; exit 1; }
-    cat stdout
+    run_make -O -- -n $target
     case $target in
     install-* | installdirs | tags ) ;;
     *)
diff --git a/t/output7.sh b/t/output7.sh
index 8ec74bc..d8832db 100644
--- a/t/output7.sh
+++ b/t/output7.sh
@@ -63,10 +63,9 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 ./configure
-$MAKE >output
-cat output
-grep in--mk output
-grep in--sub output
-grep at--toplevel output
+run_make -O
+grep in--mk stdout
+grep in--sub stdout
+grep at--toplevel stdout
 
 $MAKE distcheck
diff --git a/t/parallel-tests-basics.sh b/t/parallel-tests-basics.sh
index 4d0fe95..1d25cbc 100644
--- a/t/parallel-tests-basics.sh
+++ b/t/parallel-tests-basics.sh
@@ -64,8 +64,7 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=1 fail=1 skip=0 xfail=0 xpass=0 error=1
 test -f test-suite.log
 cat test-suite.log
@@ -87,8 +86,7 @@ test ! -e test-suite.log
 # Note that this usage has a problem: the summary will only
 # take bar.log into account, because the $(TEST_SUITE_LOG) rule
 # does not "see" baz.log.  Hmm.
-run_make TESTS='bar.test' check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TESTS='bar.test' check
 grep '^FAIL: baz\.test$' stdout
 grep '^ERROR: bar\.test$' stdout
 
@@ -103,8 +101,7 @@ test -f test-suite.log
 # Note that the previous test and this one taken together expose the timing
 # issue that requires the check-TESTS rule to always remove TEST_SUITE_LOG
 # before running the tests lazily.
-run_make RECHECK_LOGS= check > stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=
 test -f foo.log
 grep '^PASS: foo\.test$' stdout
 grep bar.test stdout && exit 1
@@ -115,8 +112,7 @@ grep '^# ERROR: *1$' stdout
 
 # Now, explicitly retry with all test logs already updated, and ensure
 # that the summary is still displayed.
-run_make RECHECK_LOGS= check > stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=
 grep foo.test stdout && exit 1
 grep bar.test stdout && exit 1
 grep baz.test stdout && exit 1
@@ -125,8 +121,7 @@ grep '^# FAIL: *1$' stdout
 grep '^# ERROR: *1$' stdout
 
 # Lazily rerunning only foo should only rerun this one test.
-run_make RECHECK_LOGS=foo.log check > stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=foo.log
 grep foo.test stdout
 grep bar.test stdout && exit 1
 grep baz.test stdout && exit 1
@@ -135,15 +130,13 @@ grep '^# FAIL: *1$' stdout
 grep '^# ERROR: *1$' stdout
 
 $MAKE clean
-run_make TEST_LOGS=baz.log check > stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TEST_LOGS=baz.log check
 grep foo.test stdout && exit 1
 grep bar.test stdout && exit 1
 grep baz.test stdout
 
 $MAKE clean
-run_make TESTS=baz.test check > stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TESTS=baz.test check
 grep foo.test stdout && exit 1
 grep bar.test stdout && exit 1
 grep baz.test stdout
diff --git a/t/parallel-tests-cmdline-override.sh 
b/t/parallel-tests-cmdline-override.sh
index ef78c26..d4d9abc 100644
--- a/t/parallel-tests-cmdline-override.sh
+++ b/t/parallel-tests-cmdline-override.sh
@@ -60,8 +60,7 @@ END
 
 do_check ()
 {
-  run_make "$@" check >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -- "$@" check
   grep '^PASS:' stdout | LC_ALL=C sort > got-out
   cat got-out
   ls . | grep '\.log$' | LC_ALL=C sort > got-log
diff --git a/t/parallel-tests-concurrency.sh b/t/parallel-tests-concurrency.sh
index e20c82e..dd51225 100644
--- a/t/parallel-tests-concurrency.sh
+++ b/t/parallel-tests-concurrency.sh
@@ -17,6 +17,9 @@
 # Check parallel-tests features:
 # - concurrent parallel execution
 
+# FIXME: we should factorize the code to determine how to run
+#        make in parallel out in am-test-lib.sh ...
+
 . test-init.sh
 
 case $MAKE in
@@ -90,6 +93,8 @@ $MAKE ${j}1 check &
 cd ../parallel
 $sleep
 # Use append mode here to avoid dropping output.  See automake bug#11413.
+# TODO: port this to to run_make(), and rewrite this hunk to use that
+#       function ...
 : > stdout
 $MAKE ${j}4 check >> stdout
 cd ..
diff --git a/t/parallel-tests-console-output.sh 
b/t/parallel-tests-console-output.sh
index 2b8cebf..ea3c15b 100644
--- a/t/parallel-tests-console-output.sh
+++ b/t/parallel-tests-console-output.sh
@@ -92,8 +92,7 @@ for vpath in : false; do
     srcdir=.
   fi
   $srcdir/configure
-  $MAKE check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   LC_ALL=C grep '^[A-Z][A-Z]*:' stdout > got
   cat got
   diff $srcdir/exp got
diff --git a/t/parallel-tests-dry-run-2.sh b/t/parallel-tests-dry-run-2.sh
index 087e22f..efb96e1 100644
--- a/t/parallel-tests-dry-run-2.sh
+++ b/t/parallel-tests-dry-run-2.sh
@@ -37,8 +37,7 @@ $AUTOCONF
 make_n_ ()
 {
   st=0
-  $MAKE -n "$@" >output 2>&1 || { cat output; ls -l; exit 1; }
-  cat output
+  run_make -M -- -n "$@" || { ls -l; exit 1; }
   # Look out for possible errors from common tools used by recipes.
   $EGREP -i ' (exist|permission|denied|no .*(such|file))' output && exit 1
   $EGREP '(mv|cp|rm|cat|grep|sed|awk): ' output && exit 1
diff --git a/t/parallel-tests-empty.sh b/t/parallel-tests-empty.sh
index 1407c5a..d431bf2 100644
--- a/t/parallel-tests-empty.sh
+++ b/t/parallel-tests-empty.sh
@@ -20,6 +20,7 @@
 # See 'parallel-tests-trailing-whitespace.sh' for a similar issue.
 
 . test-init.sh
+
 cat >> configure.ac << 'END'
 AC_OUTPUT
 END
@@ -33,10 +34,9 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 for x in TOTAL PASS FAIL XPASS FAIL SKIP ERROR; do
   grep "^# $x: *0$" stdout
 done
 
-exit 0
+:
diff --git a/t/parallel-tests-exit-statuses.sh 
b/t/parallel-tests-exit-statuses.sh
index 8612004..54181e2 100644
--- a/t/parallel-tests-exit-statuses.sh
+++ b/t/parallel-tests-exit-statuses.sh
@@ -67,20 +67,17 @@ $AUTOMAKE -a
 sed 's/^FAIL:/XFAIL:/' exp-0 | LC_ALL=C sort > exp-1
 sed '/^ERROR:/d' exp-1 > exp-2
 
-sort exp-0
-sort exp-1
-sort exp-2
-
 ./configure
 
 mk_ ()
 {
   n=$1; shift
   unset am_make_rc_got
-  run_make -e IGNORE ${1+"$@"} check > stdout
-  cat stdout
+  run_make -e IGNORE -O -- ${1+"$@"} check
   cat test-suite.log
   LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-$n
+  cat exp-$n
+  cat got-$n
   diff exp-$n got-$n
 }
 
diff --git a/t/parallel-tests-extra-programs.sh 
b/t/parallel-tests-extra-programs.sh
index b8d7a99..4df28ad 100644
--- a/t/parallel-tests-extra-programs.sh
+++ b/t/parallel-tests-extra-programs.sh
@@ -115,13 +115,10 @@ $AUTOMAKE -a
 #    'test-suite.log' file shouldn't be created (as it depends
 #     on *all* the test logs).
 
-st=0
-$MAKE -k check >stdout 2>stderr || st=$?
-cat stdout
-cat stderr >&2
+run_make -E -O -e IGNORE -- -k check
 ls -l
 if using_gmake; then
-  test $st -gt 0 || exit 1
+  test $am_make_rc_got -gt 0 || exit 1
 else
   # Don't trust exit status of "make -k" for non-GNU make.
   $MAKE check && exit 1
@@ -158,8 +155,7 @@ $sleep
 
 echo 'int main (void) { return 0; }' > none.c
 
-run_make -e IGNORE RECHECK_LOGS= check >stdout
-cat stdout
+run_make -O -e IGNORE check RECHECK_LOGS=
 ls -l # For debugging.
 test $am_make_rc_got -eq 0 || exit 1
 
diff --git a/t/parallel-tests-fd-redirect-exeext.sh 
b/t/parallel-tests-fd-redirect-exeext.sh
index 41f3098..e4d7caa 100644
--- a/t/parallel-tests-fd-redirect-exeext.sh
+++ b/t/parallel-tests-fd-redirect-exeext.sh
@@ -104,12 +104,10 @@ grep '^\.test\$(EXEEXT)\.log:' Makefile || st=1
 grep '^qux\.log:' Makefile && st=1
 test $st -eq 0 || fatal_ "doesn't cover expected code paths"
 
-st=0
-$MAKE check >stdout || st=1
-cat stdout
+run_make -O -e IGNORE check
 cat baz.log
 cat qux.log
-test $st -eq 0
+test $am_make_rc_got -eq 0
 grep "^ bazbazbaz$" stdout
 grep "^ quxquxqux$" stdout
 $EGREP '(bazbazbaz|quxquxqux)' *.log && exit 1
diff --git a/t/parallel-tests-fd-redirect.sh b/t/parallel-tests-fd-redirect.sh
index c723203..1ccaf74 100644
--- a/t/parallel-tests-fd-redirect.sh
+++ b/t/parallel-tests-fd-redirect.sh
@@ -57,11 +57,10 @@ grep '^bar\.log:.*bar' Makefile || st=1
 grep '^foo\.log:' Makefile && st=1
 test $st -eq 0 || fatal_ "doesn't cover expected code paths"
 
-st=0; $MAKE check >stdout || st=1
-cat stdout
+run_make -O -e IGNORE check
 cat foo.log
 cat bar.log
-test $st -eq 0
+test $am_make_rc_got -eq 0
 grep "^ foofoofoo$" stdout
 grep "^ barbarbar$" stdout
 $EGREP '(foofoofoo|barbarbar)' *.log && exit 1
diff --git a/t/parallel-tests-fork-bomb.sh b/t/parallel-tests-fork-bomb.sh
index e63c0d7..1361bbd 100644
--- a/t/parallel-tests-fork-bomb.sh
+++ b/t/parallel-tests-fork-bomb.sh
@@ -98,16 +98,14 @@ $AUTOMAKE -a -Wno-portability
 
 do_check ()
 {
-  st=0
   log=$1; shift
-  run_make "$@" check >output 2>&1 || st=$?
-  cat output
+  run_make -M -e IGNORE -- "$@" check
   $FGREP '::OOPS::' output && exit 1 # Possible infinite recursion.
   # Check that at least we don't create a botched global log file.
   test ! -e "$log"
   if using_gmake; then
     grep "[Cc]ircular.*dependency" output | $FGREP "$log"
-    test $st -gt 0
+    test $am_make_rc_got -gt 0
   else
     # Look for possible error messages about circular dependencies from
     # either make or our own recipes.  At least one such a message must
diff --git a/t/parallel-tests-log-override-2.sh 
b/t/parallel-tests-log-override-2.sh
index 54e2ed9..b08f756 100644
--- a/t/parallel-tests-log-override-2.sh
+++ b/t/parallel-tests-log-override-2.sh
@@ -60,9 +60,7 @@ for test_list_override in \
   'TESTS=pass.test skip.test' \
   'TEST_LOGS=pass.log skip.log'
 do
-  run_make TEST_SUITE_LOG=partial.log "$test_list_override" check >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O TEST_SUITE_LOG=partial.log "$test_list_override" check
   ls -l
   count_test_results total=2 pass=1 fail=0 skip=1 xfail=0 xpass=0 error=0
   cat pass.log
diff --git a/t/parallel-tests-log-override-recheck.sh 
b/t/parallel-tests-log-override-recheck.sh
index ff6f582..2d667ac 100644
--- a/t/parallel-tests-log-override-recheck.sh
+++ b/t/parallel-tests-log-override-recheck.sh
@@ -61,15 +61,12 @@ filter_stdout ()
 }
 
 ./configure
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 
 using_gmake || $sleep # Required by BSD make.
 
 chmod a-rw test-suite.log
-run_make TEST_SUITE_LOG=my.log recheck >stdout \
-  && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TEST_SUITE_LOG=my.log recheck
 ls -l
 filter_stdout
 count_test_results total=2 pass=0 fail=1 skip=0 xfail=0 xpass=0 error=1
@@ -82,9 +79,7 @@ done
 using_gmake || $sleep # Required by BSD make.
 
 chmod a-rw my.log
-run_make BAZ_EXIT_STATUS=0 TEST_SUITE_LOG=my2.log recheck >stdout \
-  && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL BAZ_EXIT_STATUS=0 TEST_SUITE_LOG=my2.log recheck
 ls -l
 count_test_results total=2 pass=1 fail=0 skip=0 xfail=0 xpass=0 error=1
 filter_stdout
diff --git a/t/parallel-tests-no-spurious-summary.sh 
b/t/parallel-tests-no-spurious-summary.sh
index b720059..300d593 100644
--- a/t/parallel-tests-no-spurious-summary.sh
+++ b/t/parallel-tests-no-spurious-summary.sh
@@ -49,13 +49,11 @@ $AUTOMAKE -a
 
 ./configure
 
-st=0
-$MAKE check >stdout || st=$?
-cat stdout
+run_make -O -e IGNORE check
 cat test-suite.log
 cat foo.log
 cat bar.log
-test $st -eq 0 || exit $st
+test $am_make_rc_got -eq 0
 
 grep '^:test-result:XFAIL$'  foo.log
 grep '^:test-result: SKIP$'  foo.log
diff --git a/t/parallel-tests-recheck-depends-on-all.sh 
b/t/parallel-tests-recheck-depends-on-all.sh
index e2c6916..544e2de 100644
--- a/t/parallel-tests-recheck-depends-on-all.sh
+++ b/t/parallel-tests-recheck-depends-on-all.sh
@@ -63,8 +63,7 @@ $AUTOCONF
 $AUTOMAKE -a
 ./configure
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=1 fail=2 skip=0 xfail=0 xpass=0 error=0
 test ! -e status
 
@@ -79,14 +78,12 @@ int main (void)
 }
 END
 
-$MAKE recheck >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O recheck
 count_test_results total=2 pass=2 fail=0 skip=0 xfail=0 xpass=0 error=0
 grep '^PASS: b\.test$' stdout
 grep '^PASS: c\.test$' stdout
 
-$MAKE recheck >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O recheck
 count_test_results total=0 pass=0 fail=0 skip=0 xfail=0 xpass=0 error=0
 
 :
diff --git a/t/parallel-tests-recheck-pr11791.sh 
b/t/parallel-tests-recheck-pr11791.sh
index 94d576c..cad1969 100644
--- a/t/parallel-tests-recheck-pr11791.sh
+++ b/t/parallel-tests-recheck-pr11791.sh
@@ -38,23 +38,20 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
 
 $sleep # Required to avoid a spurious failure with some FreeBSD makes.
-st=0; $MAKE -k recheck >stdout || st=$?
-cat stdout
+run_make -O -e IGNORE -- -k recheck
 # Don't trust the exit status of "make -k" for non-GNU makes.
-if using_gmake && test $st -eq 0; then exit 1; else :; fi
+! using_gmake || test $am_make_rc_got -gt 0 || exit 1
 count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
 
 # Introduce an error in foo.c, that should cause a compilation failure.
 $sleep
 echo choke me >> foo.c
 
-$MAKE recheck >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL recheck
 # We don't get a change to run the testsuite.
 $EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1
 # These shouldn't be removed, otherwise the next make recheck will do
@@ -63,10 +60,9 @@ test -f foo.log
 test -f foo.trs
 
 $sleep # Required to avoid a spurious failure with some FreeBSD makes.
-st=0; $MAKE -k recheck >stdout || st=$?
-cat stdout
+run_make -O -e IGNORE -- -k recheck
 # Don't trust the exit status of "make -k" for non-GNU makes.
-if using_gmake && test $st -eq 0; then exit 1; else :; fi
+! using_gmake || test $am_make_rc_got -gt 0 || exit 1
 # We don't get a change to run the testsuite.
 $EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1
 test -f foo.log
@@ -76,14 +72,12 @@ test -f foo.trs
 $sleep
 echo 'int main (void) { return 0; }' > foo.c
 
-$MAKE recheck >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O recheck
 count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
 test -f foo.log
 test -f foo.trs
 
-$MAKE recheck >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O recheck
 count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
 test -f foo.log
 test -f foo.trs
diff --git a/t/parallel-tests-recheck.sh b/t/parallel-tests-recheck.sh
index c32d7f1..6bba9c8 100644
--- a/t/parallel-tests-recheck.sh
+++ b/t/parallel-tests-recheck.sh
@@ -55,16 +55,14 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=1 fail=1 skip=0 xfail=0 xpass=0 error=1
 
 # Running this two times in a row should produce the same results the
 # second time.
 for i in 1 2; do
   using_gmake || $sleep # Required by BSD make.
-  $MAKE recheck >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL recheck
   count_test_results total=2 pass=0 fail=1 skip=0 xfail=0 xpass=0 error=1
   grep 'foo\.test' stdout && exit 1
   grep '^ERROR: bar\.test$' stdout
diff --git a/t/parallel-tests-reset-term.sh b/t/parallel-tests-reset-term.sh
index fb737bc..187a503 100644
--- a/t/parallel-tests-reset-term.sh
+++ b/t/parallel-tests-reset-term.sh
@@ -41,15 +41,11 @@ chmod a+x foobar
 
 mkcheck ()
 {
-  if $MAKE "$@" check > stdout; then
-    rc=0
-  else
-    rc=1
-  fi
+  run_make -O -e IGNORE "$@" check
   cat stdout
   cat foobar.log
   cat test-suite.log
-  return $rc
+  return $am_make_rc_got
 }
 
 $ACLOCAL
diff --git a/t/pluseq10.sh b/t/pluseq10.sh
index e283ca7..c80d23a 100644
--- a/t/pluseq10.sh
+++ b/t/pluseq10.sh
@@ -48,8 +48,7 @@ $AUTOCONF
 $AUTOMAKE
 
 ./configure
-$MAKE print >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O print
 $FGREP 'BEG: 0.h a0.h a1.h a2.h a3.h :END' stdout
 
 :
diff --git a/t/posixsubst-tests.sh b/t/posixsubst-tests.sh
index bdb7957..a7617c5 100644
--- a/t/posixsubst-tests.sh
+++ b/t/posixsubst-tests.sh
@@ -54,13 +54,12 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-$MAKE check >out 2>&1 && { cat out; exit 1; }
-cat out
+run_make -M -e FAIL check
 ls -l
-grep '^FAIL: foo1\.test *$' out
-grep '^PASS: foo2\.test *$' out
-grep '^FAIL: bary *$' out
-grep '^PASS: barz *$' out
+grep '^FAIL: foo1\.test *$' output
+grep '^PASS: foo2\.test *$' output
+grep '^FAIL: bary *$' output
+grep '^PASS: barz *$' output
 test -f foo1.out
 test -f bary.out
 
diff --git a/t/pr300-ltlib.sh b/t/pr300-ltlib.sh
index b3d759f..3994e36 100644
--- a/t/pr300-ltlib.sh
+++ b/t/pr300-ltlib.sh
@@ -53,8 +53,7 @@ cwd=$(pwd) || fatal_ "getting current working directory"
 
 # A rule in the Makefile should create subdir.
 test ! -e subdir
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 test -d subdir
 
 grep 'liba.la .*-rpath .*lib' stdout
@@ -64,8 +63,7 @@ grep 'libb.la .*-rpath .*lib/subdir' stdout
 test -f subdir/liba.la
 test -f subdir/libb.la
 
-$MAKE install 2>stderr || { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E install
 grep 'remember.*--finish' stderr && exit 1
 
 test -f inst/lib/liba.la
diff --git a/t/preproc-demo.sh b/t/preproc-demo.sh
index 4c1b2d9..1f29057 100644
--- a/t/preproc-demo.sh
+++ b/t/preproc-demo.sh
@@ -213,8 +213,7 @@ test -f build-aux/compile
 
 $MAKE
 
-VERBOSE=x $MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check VERBOSE=x
 cat tests/built.log
 cat tests/hello.log
 cat tests/goodbye.log
diff --git a/t/remake-aclocal-version-mismatch.sh 
b/t/remake-aclocal-version-mismatch.sh
index cb40864..6da7bad 100644
--- a/t/remake-aclocal-version-mismatch.sh
+++ b/t/remake-aclocal-version-mismatch.sh
@@ -34,13 +34,11 @@ cmp aclocal.m4 aclocal.tmp && exit 1
 
 mv aclocal.tmp aclocal.m4
 
-$MAKE 2>stderr || { cat cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E
 grep 'You have another version of autoconf' stderr
 grep 'aclocal.m4:.*this file was generated for' stderr
 
-$MAKE 2>stderr || { cat cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E
 grep 'You have another version of autoconf' stderr && exit 1
 grep 'aclocal.m4:.*this file was generated for' stderr && exit 1
 
diff --git a/t/remake-subdir3.sh b/t/remake-subdir3.sh
index f1dbc54..eb2851d 100644
--- a/t/remake-subdir3.sh
+++ b/t/remake-subdir3.sh
@@ -37,8 +37,7 @@ $MAKE
 
 do_check ()
 {
-  $MAKE >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O
   test $(grep -c "/missing " stdout) -eq 1
 }
 
diff --git a/t/self-check-shell-no-trail-bslash.sh 
b/t/self-check-shell-no-trail-bslash.sh
index 905bb6d..14ee02c 100644
--- a/t/self-check-shell-no-trail-bslash.sh
+++ b/t/self-check-shell-no-trail-bslash.sh
@@ -39,8 +39,7 @@ test "$($SHELL -c 'echo is  o\k')" = "is ok"
 
 $MAKE good
 
-$MAKE bad SHELL="$SHELL" 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_make -E -e FAIL bad SHELL="$SHELL"
 $FGREP "recipe ends with backslash character" stderr
 
 :
diff --git a/t/silent-c.sh b/t/silent-c.sh
index 28f1667..52a3862 100644
--- a/t/silent-c.sh
+++ b/t/silent-c.sh
@@ -63,8 +63,7 @@ for config_args in \
 
   ./configure --enable-silent-rules $config_args
 
-  $MAKE >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O
   $EGREP ' (-c|-o)' stdout && exit 1
   grep 'mv ' stdout && exit 1
   grep 'CC .*foo\.' stdout
@@ -77,8 +76,7 @@ for config_args in \
   grep 'CCLD .*bla' stdout
 
   $MAKE clean
-  $MAKE V=1 >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O V=1
   grep ' -c' stdout
   grep ' -o foo' stdout
   $EGREP '(CC|LD) ' stdout && exit 1
diff --git a/t/silent-custom.sh b/t/silent-custom.sh
index f5baa04..7ce3ffc 100644
--- a/t/silent-custom.sh
+++ b/t/silent-custom.sh
@@ -69,8 +69,7 @@ do_check ()
   esac
   shift
   $MAKE clean
-  $MAKE ${1+"$@"} >output 2>&1 || { cat output; exit 1; }
-  sed 's/^/  /' output
+  run_make -M -- ${1+"$@"}
   if $silent; then
     $FGREP 'cp ' output && exit 1
     $FGREP 'generate-header' output && exit 1
diff --git a/t/silent-cxx.sh b/t/silent-cxx.sh
index 0ab2aa2..00203c2 100644
--- a/t/silent-cxx.sh
+++ b/t/silent-cxx.sh
@@ -71,9 +71,10 @@ $FGREP am_cv_CXX_dependencies_compiler_type configure
 for config_args in \
   --enable-dependency-tracking --disable-dependency-tracking
 do
+
   ./configure $config_args --enable-silent-rules
-  $MAKE >stdout || { cat stdout; exit 1; }
-  cat stdout
+
+  run_make -O
 
   $EGREP ' (-c|-o)' stdout && exit 1
   grep 'mv ' stdout && exit 1
@@ -90,8 +91,7 @@ do
   # Ensure a clean rebuild.
   $MAKE clean
 
-  $MAKE V=1 >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O V=1
 
   grep ' -c ' stdout
   grep ' -o ' stdout
diff --git a/t/silent-f77.sh b/t/silent-f77.sh
index 8d608e6..8197292 100644
--- a/t/silent-f77.sh
+++ b/t/silent-f77.sh
@@ -58,8 +58,7 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 ./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 # Avoid spurious failures with SunStudio Fortran compilers.
 sed '/^NOTICE:/d' stdout > t
 mv -f t stdout
@@ -80,8 +79,7 @@ $EGREP '(FC|FCLD) ' stdout && exit 1
 # Ensure a clean rebuild.
 $MAKE clean
 
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
diff --git a/t/silent-f90.sh b/t/silent-f90.sh
index 41186c7..f319a1a 100644
--- a/t/silent-f90.sh
+++ b/t/silent-f90.sh
@@ -58,8 +58,7 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 ./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 # Avoid spurious failures with SunStudio Fortran compilers.
 sed '/^NOTICE:/d' stdout > t
 mv -f t stdout
@@ -80,8 +79,7 @@ $EGREP '(F77|F77LD) ' stdout && exit 1
 # Ensure a clean rebuild.
 $MAKE clean
 
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
diff --git a/t/silent-gen.sh b/t/silent-gen.sh
index 930dc58..ac49f2b 100644
--- a/t/silent-gen.sh
+++ b/t/silent-gen.sh
@@ -42,22 +42,19 @@ $AUTOCONF
 # Silent rules are disabled by default, since we haven't called
 # "AM_SILENT_RULES([yes])" explicitly.
 ./configure
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 grep 'GEN ' stdout && exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
 
 $MAKE clean
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 grep 'GEN ' stdout && exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
 
 $MAKE clean
-$MAKE V=0 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=0
 grep 'GEN .*foo' stdout
 grep 'cp ' stdout && exit 1
 grep 'echo ' stdout && exit 1
@@ -65,22 +62,19 @@ grep 'echo ' stdout && exit 1
 $MAKE distclean
 
 ./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 grep 'GEN .*foo' stdout
 grep 'cp ' stdout && exit 1
 grep 'echo ' stdout && exit 1
 
 $MAKE clean
-$MAKE V=0 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=0
 grep 'GEN .*foo' stdout
 grep 'cp ' stdout && exit 1
 grep 'echo ' stdout && exit 1
 
 $MAKE clean
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 grep 'GEN ' stdout && exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
diff --git a/t/silent-lex.sh b/t/silent-lex.sh
index 320e91f..3bfc400 100644
--- a/t/silent-lex.sh
+++ b/t/silent-lex.sh
@@ -73,8 +73,7 @@ $FGREP 'bar2-bar.c' sub/Makefile.in || exit 99
 
 ./configure --enable-silent-rules
 
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 
 $EGREP ' (-c|-o)' stdout && exit 1
 $EGREP '(mv|ylwrap) ' stdout && exit 1
@@ -93,8 +92,7 @@ grep 'CCLD .*bar2' stdout
 # different set of rules.
 $MAKE clean
 
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 
 $EGREP ' (-c|-o)' stdout && exit 1
 $EGREP '(mv|ylwrap) ' stdout && exit 1
@@ -111,8 +109,7 @@ grep 'CCLD .*bar2' stdout
 $MAKE clean
 rm -f *foo.c sub/*bar.c
 
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
@@ -125,8 +122,7 @@ $EGREP '(LEX|CC|CCLD) ' stdout && exit 1
 # different set of rules.
 $MAKE clean
 
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 
 # Don't look for ylwrap, as probably lex hasn't been re-run.
 grep ' -c ' stdout
diff --git a/t/silent-lt.sh b/t/silent-lt.sh
index 0ae0037..69a7d60 100644
--- a/t/silent-lt.sh
+++ b/t/silent-lt.sh
@@ -66,8 +66,7 @@ for config_args in \
 
   ./configure --enable-silent-rules $config_args
 
-  $MAKE >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O
 
   $EGREP ' (-c|-o)' stdout && exit 1
   grep 'mv ' stdout && exit 1
@@ -81,8 +80,7 @@ for config_args in \
   grep ' CCLD .*bla' stdout
 
   $MAKE clean
-  $MAKE V=1 >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O V=1
   grep ' -c' stdout
   grep ' -o libfoo' stdout
   # The libtool command line can contain e.g. a '--tag=CC' option.
diff --git a/t/silent-many-languages.sh b/t/silent-many-languages.sh
index 5395af6..309acea 100644
--- a/t/silent-many-languages.sh
+++ b/t/silent-many-languages.sh
@@ -30,8 +30,7 @@ do_and_check_silent_build ()
             *) rebuild=false;;
   esac
 
-  $MAKE >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O
   # Avoid spurious failures with SunStudio Fortran compilers.
   sed '/^NOTICE:/d' stdout > t
   mv -f t stdout
@@ -74,8 +73,7 @@ do_and_check_verbose_build ()
             *) rebuild=false;;
   esac
 
-  $MAKE V=1 >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O V=1
 
   grep ' -c ' stdout
   grep ' -o ' stdout
diff --git a/t/silent-nested-vars.sh b/t/silent-nested-vars.sh
index 08f46fd..9460ff9 100644
--- a/t/silent-nested-vars.sh
+++ b/t/silent-nested-vars.sh
@@ -115,8 +115,7 @@ grep '^checking whether \./mymake supports nested 
variables\.\.\. no *$' \
 $EGREP 'CC|AM_V|GEN' Makefile # For debugging.
 grep '^AM_V_CC =  *\$(am__v_CC_0) *$' Makefile
 grep '^AM_V_GEN =  *\$(am__v_GEN_0) *$' Makefile
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 $EGREP ' (-c|-o)' stdout && exit 1
 grep 'mv ' stdout && exit 1
 grep 'echo .*oop' stdout && exit 1
@@ -135,8 +134,7 @@ $EGREP 'CC|AM_V|GEN' Makefile # For debugging.
 grep '^AM_V_CC =  *\$(am__v_CC_1) *$' Makefile
 grep '^AM_V_GEN =  *\$(am__v_GEN_1) *$' Makefile
 
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 grep ' -c' stdout
 grep ' -o foo' stdout
 grep ' -o bar' stdout
diff --git a/t/silent-texi.sh b/t/silent-texi.sh
index cbc6813..dc425a8 100644
--- a/t/silent-texi.sh
+++ b/t/silent-texi.sh
@@ -47,11 +47,7 @@ $AUTOCONF
 ./configure --disable-silent-rules
 
 # Silent mode output.
-st=0
-$MAKE V=0 dvi html info ps pdf >stdout 2>stderr || st=$?
-cat stdout
-cat stderr >&2
-test $st -eq 0
+run_make -O -E -- V=0 dvi html info ps pdf
 grep '^  DVIPS    foo\.ps$'         stdout
 grep '^  MAKEINFO foo\.html$'       stdout
 # NetBSD make will print './foo.info' instead of 'foo.info'.
@@ -73,8 +69,7 @@ $EGREP '(zardoz|foo)\.log|3\.14|Copyright|This is|[Oo]utput ' 
\
 
 # Verbose mode output.
 $MAKE clean || exit 1
-$MAKE V=1 dvi html info ps pdf >output 2>&1 || { cat output; exit 1; }
-cat output
+run_make -M V=1 dvi html info ps pdf
 $EGREP '(DVIPS|MAKEINFO|TEXI2(PDF|DVI)) ' output && exit 1
 # Verbose output from TeX.
 grep '[Oo]utput .*foo\.pdf' output
diff --git a/t/silent-yacc-headers.sh b/t/silent-yacc-headers.sh
index 87a8ec4..837b10e 100644
--- a/t/silent-yacc-headers.sh
+++ b/t/silent-yacc-headers.sh
@@ -60,8 +60,7 @@ $FGREP '$(bar_YFLAGS)' Makefile.in
 
 ./configure --enable-silent-rules
 
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 
 $EGREP ' (-c|-d|-o)' stdout && exit 1
 $EGREP '(mv|ylwrap) ' stdout && exit 1
@@ -78,8 +77,7 @@ grep 'CCLD  *bar' stdout
 
 # Check recovering from header removal.
 rm -f parse.h bar-parse.h
-$MAKE parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O parse.h bar-parse.h
 
 $EGREP ' (-c|-d|-o)' stdout && exit 1
 $EGREP '(mv|ylwrap) ' stdout && exit 1
@@ -94,8 +92,7 @@ grep 'updating  *bar-parse\.h' stdout
 # different set of rules.
 $MAKE clean
 
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 
 $EGREP ' (-c|-d|-o)' stdout && exit 1
 $EGREP '(mv|ylwrap) ' stdout && exit 1
@@ -109,8 +106,7 @@ grep 'CCLD  *bar' stdout
 
 # Check recovering from header removal.
 rm -f parse.h bar-parse.h
-$MAKE parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O parse.h bar-parse.h
 
 $EGREP ' (-c|-d|-o)' stdout && exit 1
 $EGREP '(mv|ylwrap) ' stdout && exit 1
@@ -125,8 +121,7 @@ $MAKE maintainer-clean
 
 ./configure --enable-silent-rules
 
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
@@ -137,8 +132,7 @@ $EGREP '(YACC|CC|CCLD) ' stdout && exit 1
 
 # Check recovering from header removal.
 rm -f parse.h bar-parse.h
-$MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1 parse.h bar-parse.h
 
 grep ' -d ' stdout
 grep 'ylwrap ' stdout
@@ -150,8 +144,7 @@ grep 'YACC' stdout && exit 1
 # different set of rules.
 $MAKE clean
 
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 
 # Don't look for ylwrap, as probably lex hasn't been re-run.
 grep ' -c ' stdout
@@ -161,8 +154,7 @@ $EGREP '(YACC|CC|CCLD) ' stdout && exit 1
 
 # Check recovering from header removal.
 rm -f parse.h bar-parse.h
-$MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1 parse.h bar-parse.h
 
 grep ' -d ' stdout
 grep 'ylwrap ' stdout
diff --git a/t/silent-yacc.sh b/t/silent-yacc.sh
index bb21518..cbe21d4 100644
--- a/t/silent-yacc.sh
+++ b/t/silent-yacc.sh
@@ -70,8 +70,7 @@ $FGREP 'bar2-bar.c' sub/Makefile.in || exit 99
 
 ./configure --enable-silent-rules
 
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 
 $EGREP ' (-c|-o)' stdout && exit 1
 $EGREP '(mv|ylwrap) ' stdout && exit 1
@@ -90,8 +89,7 @@ grep 'CCLD .*bar2' stdout
 # different set of rules.
 $MAKE clean
 
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 
 $EGREP ' (-c|-o)' stdout && exit 1
 $EGREP '(mv|ylwrap) ' stdout && exit 1
@@ -108,8 +106,7 @@ grep 'CCLD .*bar2' stdout
 $MAKE clean
 rm -f *foo.[ch] sub/*bar.[ch]
 
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
@@ -122,8 +119,7 @@ $EGREP '(YACC|CC|CCLD) ' stdout && exit 1
 # different set of rules.
 $MAKE clean
 
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 
 # Don't look for ylwrap, as probably lex hasn't been re-run.
 grep ' -c ' stdout
diff --git a/t/subobj9.sh b/t/subobj9.sh
index 1f81e08..9fe4f7a 100644
--- a/t/subobj9.sh
+++ b/t/subobj9.sh
@@ -73,15 +73,13 @@ export AUTOCONF AUTOMAKE
 
 # Opportunistically check that --tag=CXX is used when supported.
 if ./libtool --help | grep tag=TAG; then
-  $MAKE print >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O print
   grep 'BEG1: .*--tag=CXX.*--mode=compile.* :1END' stdout
   grep 'BEG2: .*--tag=CXX.*--mode=link.* :2END' stdout
 fi
 
 $MAKE
-$MAKE distcheck >output 2>&1 || { cat output; exit 1; }
-cat output
+run_make -M distcheck
 # GNU Make used to complain that the Makefile contained two rules
 # for 'src/.dirstamp' and './/src/.dirstamp'.
 grep 'overriding commands' output && exit 1
diff --git a/t/subst-no-trailing-empty-line.sh 
b/t/subst-no-trailing-empty-line.sh
index 3fcb1b7..5097f5f 100644
--- a/t/subst-no-trailing-empty-line.sh
+++ b/t/subst-no-trailing-empty-line.sh
@@ -82,14 +82,12 @@ test $($EGREP -c "^[ address@hidden@ @address@hidden 
$tab]*$bs?$" Makefile.in) -eq 3
 cat t-programs
 grep '^ *$' t-programs && exit 1
 
-run_make print-programs >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O print-programs
 grep '^BEG1: x :END1$' stdout
 grep '^BEG2: :END2$' stdout
 grep '^BEG3: zardoz x :END3$' stdout
 
-run_make am__empty=X print-programs >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O am__empty=X print-programs
 grep '^BEG1: x X :END1$' stdout
 grep '^BEG2: X :END2$' stdout
 grep '^BEG3: zardoz x X :END3$' stdout
diff --git a/t/tap-ambiguous-directive.sh b/t/tap-ambiguous-directive.sh
index 6804e67..500a483 100644
--- a/t/tap-ambiguous-directive.sh
+++ b/t/tap-ambiguous-directive.sh
@@ -32,9 +32,7 @@ ok 5 # SKIP SKIP
 not ok 6 # TODO TODO
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=6 pass=2 fail=2 xpass=0 xfail=1 skip=1 error=0
 
 cat > exp << 'END'
diff --git a/t/tap-autonumber.sh b/t/tap-autonumber.sh
index f1820ce..d89aa78 100644
--- a/t/tap-autonumber.sh
+++ b/t/tap-autonumber.sh
@@ -44,8 +44,7 @@ not ok
 ok
 END
 
-run_make TESTS=all.test check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TESTS=all.test check
 count_test_results total=14 pass=6 fail=5 xpass=1 xfail=1 skip=1 error=0
 
 cat > exp <<'END'
diff --git a/t/tap-bad-prog.tap b/t/tap-bad-prog.tap
index cf1f371..490cd4a 100644
--- a/t/tap-bad-prog.tap
+++ b/t/tap-bad-prog.tap
@@ -49,13 +49,8 @@ $AUTOMAKE
 
 ./configure
 
-if $MAKE check >stdout; then
-  r='not ok'
-else
-  r='ok'
-fi
-cat stdout
-result_ "$r" '"make check" returns non-zero exit status'
+command_ok_ '"make check" returns non-zero exit status' \
+            run_make -O -e FAIL check
 
 # FIXME: maybe grep for stricter error messages in the next checks?
 
diff --git a/t/tap-bailout-leading-space.sh b/t/tap-bailout-leading-space.sh
index c84c612..120ae03 100644
--- a/t/tap-bailout-leading-space.sh
+++ b/t/tap-bailout-leading-space.sh
@@ -50,10 +50,7 @@ ERROR: b.test - Bail out!
 ERROR: c.test - Bail out! FUBAR!
 END
 
-run_make TESTS='a.test b.test c.test' check >stdout \
-  && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='a.test b.test c.test' check
 count_test_results total=5 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=3
 
 LC_ALL=C sort exp > t
diff --git a/t/tap-bailout-suppress-badexit.sh 
b/t/tap-bailout-suppress-badexit.sh
index 1a10b83..8f5fb15 100644
--- a/t/tap-bailout-suppress-badexit.sh
+++ b/t/tap-bailout-suppress-badexit.sh
@@ -54,10 +54,9 @@ END
 
 chmod a+x $tests
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=4 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=4
+
 for tst in $tests; do grep "^ERROR: $tst - Bail out!" stdout; done
 $EGREP "ERROR: .*(exit.*status|terminat.*signal)" stdout && exit 1
 
diff --git a/t/tap-bailout-suppress-later-diagnostic.sh 
b/t/tap-bailout-suppress-later-diagnostic.sh
index 3045e1d..730e461 100644
--- a/t/tap-bailout-suppress-later-diagnostic.sh
+++ b/t/tap-bailout-suppress-later-diagnostic.sh
@@ -32,11 +32,7 @@ Bail out!
 # not seen
 END
 
-# Doing the sums above, we have:
-
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
 grep '# all.test: sanity check' stdout
 grep 'not seen' stdout && exit 1
diff --git a/t/tap-bailout-suppress-later-errors.sh 
b/t/tap-bailout-suppress-later-errors.sh
index 7f60294..365e894 100644
--- a/t/tap-bailout-suppress-later-errors.sh
+++ b/t/tap-bailout-suppress-later-errors.sh
@@ -52,10 +52,7 @@ ok 2
 ok 3
 END
 
-run_make TESTS='foo.test bar.test baz.test' check >stdout \
-  && { cat stdout; exit 1; }
-cat stdout
-
+run_make -e FAIL -O TESTS='foo.test bar.test baz.test' check
 count_test_results total=5 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=3
 
 grep '^ERROR: foo\.test - Bail out!$' stdout
diff --git a/t/tap-bailout.sh b/t/tap-bailout.sh
index b6c0f56..94100f4 100644
--- a/t/tap-bailout.sh
+++ b/t/tap-bailout.sh
@@ -118,10 +118,7 @@ echo "ERROR: e.test - Bail out!" >> exp
 # Doing the sums above, we have:
 test_counts='total=12 pass=3 fail=1 xpass=1 xfail=1 skip=1 error=5'
 
-run_make TESTS='a.test b.test c.test d.test e.test' check >stdout \
-  && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='a.test b.test c.test d.test e.test' check
 count_test_results $test_counts
 
 LC_ALL=C sort exp > t
diff --git a/t/tap-basic.sh b/t/tap-basic.sh
index 5e4462b..b2b01ba 100644
--- a/t/tap-basic.sh
+++ b/t/tap-basic.sh
@@ -80,9 +80,7 @@ $AUTOMAKE
 
 # Basilar usage and testsuite progress output.
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=20 pass=4 fail=4 xpass=4 xfail=4 skip=4 error=0
 
 test -f success.log
@@ -127,9 +125,7 @@ Bail out!
 ok 1
 END
 
-run_make check TESTS=bail.test >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check TESTS=bail.test
 count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1
 
 test ! -e success.log
@@ -146,9 +142,7 @@ $FGREP 'success.test' stdout && exit 1
 
 rm -f *.log *.test
 
-run_make check TEST_LOGS=ok.log >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check TEST_LOGS=ok.log
 count_test_results total=3 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=0
 
 test -f ok.test
diff --git a/t/tap-color.sh b/t/tap-color.sh
index 997cb79..409663e 100644
--- a/t/tap-color.sh
+++ b/t/tap-color.sh
@@ -153,13 +153,11 @@ test_no_color ()
 # Forced colorization should take place also with non-ANSI terminals;
 # hence the "TERM=dumb" definition.
 AM_COLOR_TESTS=always; export AM_COLOR_TESTS
-run_make TERM=dumb check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TERM=dumb check
 test_color
 
 unset AM_COLOR_TESTS
-run_make TERM=ansi check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TERM=ansi check
 test_no_color
 
 :
diff --git a/t/tap-deps.sh b/t/tap-deps.sh
index 8de51d3..a9446bf 100644
--- a/t/tap-deps.sh
+++ b/t/tap-deps.sh
@@ -62,9 +62,7 @@ END
 
 chmod a+x *.test
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=5 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 cat > exp << 'END'
diff --git a/t/tap-diagnostic-custom.sh b/t/tap-diagnostic-custom.sh
index 978b526..d49e93f 100644
--- a/t/tap-diagnostic-custom.sh
+++ b/t/tap-diagnostic-custom.sh
@@ -81,13 +81,11 @@ $AUTOMAKE
 
 ./configure
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 count_test_results total=$i pass=$i fail=0 xpass=0 xfail=0 skip=0 error=0
 
 cat later.mk >> Makefile
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 $FGREP 'blah blah' stdout && exit 1
 
 :
diff --git a/t/tap-diagnostic.sh b/t/tap-diagnostic.sh
index 59b1bda..23efdd4 100644
--- a/t/tap-diagnostic.sh
+++ b/t/tap-diagnostic.sh
@@ -52,23 +52,19 @@ PASS: all.test 4 - zardoz
 # all.test: Shell metacharacters here: $metacharacters
 END
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 $EGREP -i "#.*all\\.test|a comment|(Tests|Shell) " stdout && exit 1
 count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
 
 echo 'AM_TEST_LOG_DRIVER_FLAGS = --comments' >> Makefile
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 $FGREP ' all.test' stdout > got
 cat exp
 cat got
 diff exp got
 count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
 
-run_make TEST_LOG_DRIVER_FLAGS="--no-comments" check >stdout \
-  || { cat stdout; exit 1; }
-cat stdout
+run_make -O TEST_LOG_DRIVER_FLAGS="--no-comments" check
 $EGREP -i "#.*all\\.test|a comment|(Tests|Shell) " stdout && exit 1
 count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
 
@@ -88,8 +84,7 @@ ok
 #TODO
 END
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 # Diagnostic without leading whitespace, or with extra leading whitespace,
@@ -109,8 +104,7 @@ ok 1
 #  ${tab} ${tab}${tab}foo  bar${tab}baz  ${tab}
 END
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 grep "^# all.test:${ws0p}foo$" stdout
diff --git a/t/tap-doc.sh b/t/tap-doc.sh
index ab5503a..ef2ab93 100644
--- a/t/tap-doc.sh
+++ b/t/tap-doc.sh
@@ -70,8 +70,7 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 
 cat > exp <<'END'
 PASS: foo.sh
diff --git a/t/tap-doc2.sh b/t/tap-doc2.sh
index 55c734b..ddac739 100644
--- a/t/tap-doc2.sh
+++ b/t/tap-doc2.sh
@@ -83,8 +83,7 @@ case $MAKE in *\ -j*) skip_ "can't work easily with 
concurrent make";; esac
 # Prevent Sun Distributed Make from trying to run in parallel.
 DMAKE_MODE=serial; export DMAKE_MODE
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 
 cat > exp <<'END'
 PASS: foo.test 1 - Swallows fly
@@ -106,10 +105,9 @@ diff exp got
 
 grep '^Please report to address@hidden' stdout
 
-run_make >stdout check \
+run_make -O check \
   TESTS='foo.test baz.test' \
-  TEST_LOG_DRIVER_FLAGS='--comments --ignore-exit' \
-  || { cat stdout; exit 1; }
+  TEST_LOG_DRIVER_FLAGS='--comments --ignore-exit'
 
 cat > exp <<'END'
 PASS: foo.test 1 - Swallows fly
diff --git a/t/tap-empty-diagnostic.sh b/t/tap-empty-diagnostic.sh
index 4a6f2b1..68a51c1 100644
--- a/t/tap-empty-diagnostic.sh
+++ b/t/tap-empty-diagnostic.sh
@@ -30,8 +30,7 @@ ok 1$
 #   ${tab} $tab${tab}$
 END
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 
 grep '^PASS:.*all\.test' stdout # Sanity check.
 grep '#.*all\.test' stdout && exit 1
diff --git a/t/tap-empty.sh b/t/tap-empty.sh
index 7943f1d..ec1e909 100644
--- a/t/tap-empty.sh
+++ b/t/tap-empty.sh
@@ -45,8 +45,7 @@ END
 
 for input in empty blank white white2; do
   cp $input.test all.test
-  $MAKE check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1
   grep '^ERROR: all\.test - missing test plan$' stdout
 done
diff --git a/t/tap-escape-directive-2.sh b/t/tap-escape-directive-2.sh
index 135df29..63caafd 100644
--- a/t/tap-escape-directive-2.sh
+++ b/t/tap-escape-directive-2.sh
@@ -37,9 +37,7 @@ not ok \\\\\\\\\\# TODO
 ok     \\\\\\\\\\# SKIP
 END
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=8 pass=2 fail=0 xpass=0 xfail=3 skip=3 error=0
 
 grep '^XFAIL: all\.test 1 .*# TODO' stdout
diff --git a/t/tap-escape-directive.sh b/t/tap-escape-directive.sh
index daf766c..feb95d3 100644
--- a/t/tap-escape-directive.sh
+++ b/t/tap-escape-directive.sh
@@ -27,9 +27,7 @@ ok \# TODO
 ok \# SKIP
 END
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=2 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 grep '^PASS: all\.test 1 .*# TODO' stdout
diff --git a/t/tap-exit.sh b/t/tap-exit.sh
index 9e0937d..95c194e 100644
--- a/t/tap-exit.sh
+++ b/t/tap-exit.sh
@@ -36,8 +36,7 @@ chmod a+x *.test
 
 . tap-setup.sh
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=8 pass=4 fail=0 xpass=0 xfail=0 skip=0 error=4
 
 grep '^ERROR: exit1\.test - exited with status 1$' stdout
@@ -46,8 +45,7 @@ grep '^ERROR: exit77\.test - exited with status 77$' stdout
 grep '^ERROR: exit99\.test - exited with status 99$' stdout
 
 echo TEST_LOG_DRIVER_FLAGS = --ignore-exit >> Makefile
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 count_test_results total=4 pass=4 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 :
diff --git a/t/tap-fancy.sh b/t/tap-fancy.sh
index 724dd1b..f6e8d4c 100644
--- a/t/tap-fancy.sh
+++ b/t/tap-fancy.sh
@@ -68,9 +68,7 @@ not ok!#TODO?
 ok~#TODO
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=21 pass=6 fail=6 xfail=4 xpass=1 skip=4 error=0
 
 #
@@ -91,9 +89,7 @@ ok $weirdchars # SKIP
 Bail out! $weirdchars
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=6 pass=1 fail=1 xfail=1 xpass=1 skip=1 error=1
 $FGREP "PASS: all.test 1 $weirdchars" stdout
 $FGREP "FAIL: all.test 2 $weirdchars" stdout
@@ -118,10 +114,9 @@ ok # SKIP $bs
 Bail out! $bs
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=6 pass=1 fail=1 xfail=1 xpass=1 skip=1 error=1
+
 grep '^PASS: all\.test 1 \\$' stdout
 grep '^FAIL: all\.test 2 \\$' stdout
 grep '^XPASS: all\.test 3 # TODO \\$' stdout
diff --git a/t/tap-fancy2.sh b/t/tap-fancy2.sh
index 1e53c2b..c0742f1 100644
--- a/t/tap-fancy2.sh
+++ b/t/tap-fancy2.sh
@@ -125,8 +125,7 @@ total=$(($total + 3))
 # And add the test plan!
 echo 1..$total >> all.test
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 
 $EGREP '^(PASS|FAIL|SKIP).*#.*TODO' stdout && exit 1
 $EGREP '^X?(PASS|FAIL).*#.*SKIP' stdout && exit 1
diff --git a/t/tap-global-result.sh b/t/tap-global-result.sh
index a4a1fd1..025d784 100644
--- a/t/tap-global-result.sh
+++ b/t/tap-global-result.sh
@@ -140,8 +140,7 @@ END
 
 tests=$(echo *.test) # Also required later.
 
-run_make TESTS="$tests" check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TESTS="$tests" check
 
 # Dirty trick required here.
 for tst in $(echo " $tests " | sed 's/\.test / /'); do
diff --git a/t/tap-log.sh b/t/tap-log.sh
index d7eab8a..d762ed7 100644
--- a/t/tap-log.sh
+++ b/t/tap-log.sh
@@ -132,8 +132,7 @@ test -f global.log
 
 rm -f *.log
 
-VERBOSE=yes $MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check VERBOSE=yes
 cat global.log
 test ! -e my.log
 test ! -e test-suite.log
diff --git a/t/tap-merge-stdout-stderr.sh b/t/tap-merge-stdout-stderr.sh
index ef99d82..26a16e8 100644
--- a/t/tap-merge-stdout-stderr.sh
+++ b/t/tap-merge-stdout-stderr.sh
@@ -40,10 +40,9 @@ echo "# foo foo foo" >&2
 END
 chmod a+x all.test
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
+
 grep '^# all\.test: foo foo foo' stdout
 
 cat > all.test <<END
@@ -53,19 +52,12 @@ echo ok 1
 echo 'Bail out!' >&2
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
 
 # See that the option '--no-merge' can override the effect of '--merge'.
 
-run_make TEST_LOG_DRIVER_FLAGS=--no-merge check >stdout \
-  || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O TEST_LOG_DRIVER_FLAGS=--no-merge check
 count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
 
-
-
 :
diff --git a/t/tap-missing-plan-and-bad-exit.sh 
b/t/tap-missing-plan-and-bad-exit.sh
index 45b2413..b578e6a 100644
--- a/t/tap-missing-plan-and-bad-exit.sh
+++ b/t/tap-missing-plan-and-bad-exit.sh
@@ -32,8 +32,7 @@ chmod a+x foo.test
 
 . tap-setup.sh
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 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
diff --git a/t/tap-more2.sh b/t/tap-more2.sh
index ae15931..491399e 100644
--- a/t/tap-more2.sh
+++ b/t/tap-more2.sh
@@ -82,8 +82,7 @@ $AUTOMAKE
 ./configure
 
 for target in check distcheck; do
-  $MAKE $target >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O $target
   count_test_results total=3 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=0
 done
 
diff --git a/t/tap-msg0-bailout.sh b/t/tap-msg0-bailout.sh
index 9e2bdce..c6b3ca5 100644
--- a/t/tap-msg0-bailout.sh
+++ b/t/tap-msg0-bailout.sh
@@ -26,9 +26,7 @@
 echo 'Bail out! 0' > a.test
 echo 'Bail out! 0.0' > b.test
 
-run_make TESTS='a.test b.test' check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='a.test b.test' check
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=2
 
 grep '^ERROR: a.test - Bail out! 0$' stdout
diff --git a/t/tap-msg0-directive.sh b/t/tap-msg0-directive.sh
index a735153..5f06820 100644
--- a/t/tap-msg0-directive.sh
+++ b/t/tap-msg0-directive.sh
@@ -28,9 +28,7 @@ not ok 2 # TODO 0
 ok 3 # SKIP 0
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 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
diff --git a/t/tap-msg0-misc.sh b/t/tap-msg0-misc.sh
index e1f48a9..c5c7245 100644
--- a/t/tap-msg0-misc.sh
+++ b/t/tap-msg0-misc.sh
@@ -45,9 +45,7 @@ ok 14 0.0 # SKIP 0.0
 
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=14 pass=2 fail=0 xpass=4 xfail=4 skip=4 error=0
 
 sed '/^ *$/d' > exp << 'END'
diff --git a/t/tap-msg0-planskip.sh b/t/tap-msg0-planskip.sh
index 3c6252d..71e882e 100644
--- a/t/tap-msg0-planskip.sh
+++ b/t/tap-msg0-planskip.sh
@@ -25,9 +25,7 @@
 echo '1..0 # SKIP 0' > a.test
 echo '1..0 # SKIP 0.0' > b.test
 
-run_make TESTS='a.test b.test' check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O TESTS='a.test b.test' check
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=0
 
 grep '^SKIP: a.test - 0$' stdout
diff --git a/t/tap-msg0-result.sh b/t/tap-msg0-result.sh
index cdadd40..2e0263f 100644
--- a/t/tap-msg0-result.sh
+++ b/t/tap-msg0-result.sh
@@ -35,9 +35,7 @@ ok 9 0 # SKIP
 ok - 0 # SKIP
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=10 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=0
 
 cat > exp << 'END'
diff --git a/t/tap-negative-numbers.sh b/t/tap-negative-numbers.sh
index 0a04fdb..efd17dc 100644
--- a/t/tap-negative-numbers.sh
+++ b/t/tap-negative-numbers.sh
@@ -33,9 +33,7 @@ ok -121
 not ok -50000
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=7 pass=2 fail=2 xpass=1 xfail=1 skip=1 error=0
 
 cat > exp <<'END'
diff --git a/t/tap-no-disable-hard-error.sh b/t/tap-no-disable-hard-error.sh
index 99b2f49..1a47b56 100644
--- a/t/tap-no-disable-hard-error.sh
+++ b/t/tap-no-disable-hard-error.sh
@@ -41,9 +41,7 @@ cat > noplan.test <<END
 # nothing here
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=3
 
 :
diff --git a/t/tap-no-merge-stdout-stderr.sh b/t/tap-no-merge-stdout-stderr.sh
index 4ce4869..1fc0da6 100644
--- a/t/tap-no-merge-stdout-stderr.sh
+++ b/t/tap-no-merge-stdout-stderr.sh
@@ -42,10 +42,9 @@ END
 
 chmod a+x all.test
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=0
+
 $FGREP 'foo foo foo' stdout
 $FGREP 'bar bar bar' stdout && exit 1
 
diff --git a/t/tap-no-spurious-numbers.sh b/t/tap-no-spurious-numbers.sh
index 57c5ddc..95e9832 100644
--- a/t/tap-no-spurious-numbers.sh
+++ b/t/tap-no-spurious-numbers.sh
@@ -91,9 +91,7 @@ grep '#.*#' all.test \
 test $(wc -l <all.test) -lt $highno \
   || framework_failure_ "creating all.test"
 
-$MAKE check >stdout || :
-cat stdout
-
+run_make -O -e IGNORE check
 count_test_results total=$total pass=$pass fail=$fail skip=$skip \
                    xpass=$xpass xfail=$xfail error=$error
 
diff --git a/t/tap-no-spurious-summary.sh b/t/tap-no-spurious-summary.sh
index a3c3d71..1831ef3 100644
--- a/t/tap-no-spurious-summary.sh
+++ b/t/tap-no-spurious-summary.sh
@@ -34,9 +34,7 @@ cat > all.test <<'END'
 ok 1
 END
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 for result in PASS FAIL XPASS XFAIL SKIP ERROR UNKNOWN; do
diff --git a/t/tap-no-spurious.sh b/t/tap-no-spurious.sh
index 8d45529..4d5e71c 100644
--- a/t/tap-no-spurious.sh
+++ b/t/tap-no-spurious.sh
@@ -105,9 +105,7 @@ cat all.test \
   && test $(grep -c '^not ok1$' all.test) -eq 1 \
   || framework_failure_ "creating all.test"
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=5 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 :
diff --git a/t/tap-not-ok-skip.sh b/t/tap-not-ok-skip.sh
index 4ad1d42..5d747ee 100644
--- a/t/tap-not-ok-skip.sh
+++ b/t/tap-not-ok-skip.sh
@@ -30,9 +30,7 @@ not ok - foo # SKIP
 not ok 4 - bar # SKIP
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=4 pass=0 fail=4 skip=0 xpass=0 xfail=0 error=0
 
 :
diff --git a/t/tap-number-wordboundary.sh b/t/tap-number-wordboundary.sh
index a8e9f1c..ef21f67 100644
--- a/t/tap-number-wordboundary.sh
+++ b/t/tap-number-wordboundary.sh
@@ -31,9 +31,7 @@ not ok 4?&%$ foo4 # TODO
 ok 5"`!! foo5 # TODO
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=5 pass=1 fail=1 skip=1 xpass=1 xfail=1 error=0
 
 $EGREP '^PASS: all\.test 1 ?: foo1$' stdout
@@ -49,9 +47,7 @@ not ok 1!
 ok 476$ # SKIP
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=3 pass=0 fail=0 skip=0 xpass=0 xfail=0 error=3
 
 $EGREP '^ERROR: all\.test 2 ?: quux # OUT-OF-ORDER \(expecting 1\)$' stdout
@@ -102,9 +98,7 @@ cat all.test
 # Sanity check.
 grep "^ok 1'$" all.test || framework_failure_ "creating all.test"
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=$planned pass=$planned \
                    fail=0 skip=0 xpass=0 xfail=0 error=0
 
diff --git a/t/tap-numbers-leading-zero.sh b/t/tap-numbers-leading-zero.sh
index 32c252e..eeb2ee7 100644
--- a/t/tap-numbers-leading-zero.sh
+++ b/t/tap-numbers-leading-zero.sh
@@ -23,8 +23,7 @@
 
 do_checks ()
 {
-  $MAKE check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   count_test_results "$@"
   # Allow some normalization of leading zeros, without forcing it.
   LC_ALL=C sed -n 's/: all\.test 0*\([0-9]\)/: all.test \1/p' stdout > got
diff --git a/t/tap-numeric-description.sh b/t/tap-numeric-description.sh
index a007af5..a89edf9 100644
--- a/t/tap-numeric-description.sh
+++ b/t/tap-numeric-description.sh
@@ -53,9 +53,7 @@ XPASS: all.test 9 ${x9} # TODO
 XPASS: all.test 10 - ${x10} # TODO
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=10 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=0
 
 $FGREP ': all.test' stdout > got
diff --git a/t/tap-out-of-order.sh b/t/tap-out-of-order.sh
index bac7acd..bb26edd 100644
--- a/t/tap-out-of-order.sh
+++ b/t/tap-out-of-order.sh
@@ -57,10 +57,7 @@ ok 16
 ok 17
 END
 
-run_make TESTS='a.test b.test c.test d.test' check >stdout \
-  && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='a.test b.test c.test d.test' check
 count_test_results total=17 pass=8 fail=0 xpass=0 xfail=1 skip=0 error=8
 
 test $($FGREP -c ': a.test' stdout) -eq 3
diff --git a/t/tap-plan-corner.sh b/t/tap-plan-corner.sh
index 27f41fd..7b64d3e 100644
--- a/t/tap-plan-corner.sh
+++ b/t/tap-plan-corner.sh
@@ -36,9 +36,7 @@ ok 1
 END
 
 for pos in leading trailing; do
-  run_make TESTS="$pos-repeated.test" check >stdout \
-    && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL TESTS="$pos-repeated.test" check
   count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
   grep "^ERROR: $pos-repeated\\.test - multiple test plans$" stdout
 done
@@ -59,9 +57,8 @@ ok 2
 1..2
 END
 
-run_make TESTS="leading-repeated.test trailing-repeated.test" check >stdout \
-  && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check \
+  TESTS='leading-repeated.test trailing-repeated.test'
 count_test_results total=6 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=3
 grep "^ERROR: leading-repeated\\.test - multiple test plans$" stdout
 grep "^ERROR: trailing-repeated\\.test - multiple test plans$" stdout
@@ -90,9 +87,7 @@ cat > 4.test <<END
 1..0 # SKIP
 END
 
-run_make TESTS="1.test 2.test 3.test 4.test" check >stdout \
-  && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check TESTS='1.test 2.test 3.test 4.test'
 count_test_results total=8 pass=0 fail=0 xpass=0 xfail=0 skip=4 error=4
 for i in 1 2 3 4; do
   grep "^ERROR: $i\\.test - multiple test plans$" stdout
@@ -112,8 +107,7 @@ ok 4
 ok 5
 END
 
-run_make check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=8 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=3
 
 cat > exp <<'END'
@@ -143,8 +137,7 @@ ok 2
 ok 3
 END
 
-run_make check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=5 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=3
 
 cat > exp <<'END'
@@ -174,8 +167,7 @@ ok 4
 ok 5
 END
 
-run_make check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=7 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=4
 
 cat > exp <<'END'
diff --git a/t/tap-plan-errors.sh b/t/tap-plan-errors.sh
index bc0d018..c49a190 100644
--- a/t/tap-plan-errors.sh
+++ b/t/tap-plan-errors.sh
@@ -32,8 +32,7 @@ my_check ()
   cat > all.test
   test -n "$err" || fatal_ "\$err not set before calling my_check"
   cat all.test # For debugging.
-  $MAKE check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   count_test_results "$@"
   grep "^ERROR: all\\.test $err$" stdout
   unset err
diff --git a/t/tap-plan-leading-zero.sh b/t/tap-plan-leading-zero.sh
index 00caeb4..92f43e4 100644
--- a/t/tap-plan-leading-zero.sh
+++ b/t/tap-plan-leading-zero.sh
@@ -47,10 +47,7 @@ done >> d.test
 echo 1..00 > e.test
 echo '1..000 # SKIP' > f.test
 
-run_make TESTS='a.test b.test c.test d.test e.test f.test' check >stdout \
-  || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O TESTS='a.test b.test c.test d.test e.test f.test' check
 count_test_results total=115 pass=113 xfail=0 skip=2 fail=0 xpass=0 error=0
 
 :
diff --git a/t/tap-plan-malformed.sh b/t/tap-plan-malformed.sh
index e2dd7d0..82da569 100644
--- a/t/tap-plan-malformed.sh
+++ b/t/tap-plan-malformed.sh
@@ -47,9 +47,7 @@ END
 
 tests_list=$(echo *.test)
 
-run_make TESTS="$tests_list" check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS="$tests_list" check
 count_test_results total=9 pass=2 fail=0 xpass=0 xfail=2 skip=0 error=5
 
 for tst in $tests_list; do
diff --git a/t/tap-plan-middle.sh b/t/tap-plan-middle.sh
index bfc473b..dd3247b 100644
--- a/t/tap-plan-middle.sh
+++ b/t/tap-plan-middle.sh
@@ -73,9 +73,7 @@ END
 tests=$(echo *.test)
 
 for tap_flags in "" "--comments"; do
-  run_make TEST_LOG_DRIVER_FLAGS="$tap_flags" TESTS="$tests" check >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O TEST_LOG_DRIVER_FLAGS="$tap_flags" TESTS="$tests" check
   count_test_results total=12 pass=7 xfail=2 skip=3 fail=0 xpass=0 error=0
 done
 
diff --git a/t/tap-plan-whitespace.sh b/t/tap-plan-whitespace.sh
index 659a7e7..a3e2137 100644
--- a/t/tap-plan-whitespace.sh
+++ b/t/tap-plan-whitespace.sh
@@ -32,9 +32,7 @@ cat > bar.test <<END
 ok 1
 END
 
-run_make TESTS='foo.test bar.test' check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O TESTS='foo.test bar.test' check
 count_test_results total=3 pass=3 fail=0 error=0 xpass=0 xfail=0 skip=0
 
 :
diff --git a/t/tap-plan.sh b/t/tap-plan.sh
index 50ae426..f17d904 100644
--- a/t/tap-plan.sh
+++ b/t/tap-plan.sh
@@ -41,9 +41,9 @@ ok
 END
 
 for tap_flags in "" "--comments"; do
-  run_make TEST_LOG_DRIVER_FLAGS="$tap_flags" TESTS='top.test bot.test' \
-    check >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O check \
+    TESTS='top.test bot.test' \
+    TEST_LOG_DRIVER_FLAGS="$tap_flags"
   count_test_results total=7 pass=5 xfail=1 skip=1 fail=0 xpass=0 error=0
 done
 
diff --git a/t/tap-planskip-and-logging.sh b/t/tap-planskip-and-logging.sh
index b3089e4..aaea4d0 100644
--- a/t/tap-planskip-and-logging.sh
+++ b/t/tap-planskip-and-logging.sh
@@ -45,10 +45,7 @@ an early non-TAP line
 a later non-TAP line
 END
 
-run_make TESTS='foo.test foo2.test bar.test' check >stdout \
-  || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O TESTS='foo.test foo2.test bar.test' check
 count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=3 error=0
 
 grep '^# foo\.test: a comment$' stdout
diff --git a/t/tap-planskip-badexit.sh b/t/tap-planskip-badexit.sh
index d02d184..1336eac 100644
--- a/t/tap-planskip-badexit.sh
+++ b/t/tap-planskip-badexit.sh
@@ -38,8 +38,7 @@ END
 
 chmod a+x one.test two.test
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 
 # The 'prove' utility reports both the skip and the non-zero exit status,
 # so we do the same.
diff --git a/t/tap-planskip-bailout.sh b/t/tap-planskip-bailout.sh
index 655d1c9..0e6f7b1 100644
--- a/t/tap-planskip-bailout.sh
+++ b/t/tap-planskip-bailout.sh
@@ -27,8 +27,7 @@ cat > all.test <<END
 Bail out!
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=1
 grep '^ERROR: all\.test - Bail out!' stdout
 
diff --git a/t/tap-planskip-case-insensitive.sh 
b/t/tap-planskip-case-insensitive.sh
index 54a644e..790d984 100644
--- a/t/tap-planskip-case-insensitive.sh
+++ b/t/tap-planskip-case-insensitive.sh
@@ -32,9 +32,7 @@ for c4 in p P; do
   echo "1..0 # $c1$c2$c3$c4 foobar" > $j.test
 done; done; done; done
 
-run_make TESTS="$(echo *.test)" check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O TESTS="$(echo *.test)" check
 count_test_results total=16 pass=0 fail=0 xpass=0 xfail=0 skip=16 error=0
 
 for tst in *.test; do
diff --git a/t/tap-planskip-late.sh b/t/tap-planskip-late.sh
index ab3f336..94af3e8 100644
--- a/t/tap-planskip-late.sh
+++ b/t/tap-planskip-late.sh
@@ -32,8 +32,7 @@ cat > bar.test <<END
 1..0
 END
 
-run_make TESTS='foo.test bar.test' check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O TESTS='foo.test bar.test' check
 
 grep '^SKIP: foo\.test .* from the last line$' stdout
 grep '^SKIP: bar\.test$' stdout
diff --git a/t/tap-planskip-later-errors.sh b/t/tap-planskip-later-errors.sh
index e924c13..f26c14b 100644
--- a/t/tap-planskip-later-errors.sh
+++ b/t/tap-planskip-later-errors.sh
@@ -30,9 +30,7 @@ a non-TAP line
 1..1
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=4 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=3
 test $(grep -c '^ERROR: all\.test - multiple test plans' stdout) -eq 3
 
diff --git a/t/tap-planskip-unplanned-corner.sh 
b/t/tap-planskip-unplanned-corner.sh
index 2176469..36473b3 100644
--- a/t/tap-planskip-unplanned-corner.sh
+++ b/t/tap-planskip-unplanned-corner.sh
@@ -32,9 +32,7 @@ ok 1 # SKIP
 1..0 # SKIP
 END
 
-run_make TESTS='foo.test bar.test' check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='foo.test bar.test' check
 count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=3
 
 # Don't be too strict w.r.t. the format of the "skip whole test" message.
diff --git a/t/tap-planskip-unplanned.sh b/t/tap-planskip-unplanned.sh
index 07ed544..f48585c 100644
--- a/t/tap-planskip-unplanned.sh
+++ b/t/tap-planskip-unplanned.sh
@@ -27,8 +27,7 @@ cat > all.test <<END
 ok 1
 1..0 # SKIP too late
 END
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
 grep '^ERROR: all\.test - too many tests run (expected 0, got 1)$' stdout
 
@@ -38,8 +37,7 @@ ok 2 # SKIP
 not ok 3 # TODO
 1..0 # SKIP too late
 END
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=4 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=1
 grep '^ERROR: all\.test - too many tests run (expected 0, got 3)$' stdout
 
@@ -47,8 +45,7 @@ cat > all.test <<END
 1..0 # SKIP falsified later
 ok 1
 END
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=2
 grep '^ERROR: all\.test 1 # UNPLANNED$' stdout
 grep '^ERROR: all\.test - too many tests run (expected 0, got 1)$' stdout
@@ -60,8 +57,7 @@ ok 2 # SKIP
 not ok 3
 not ok 4 # TODO
 END
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=6 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=5
 grep '^ERROR: all\.test 1 # UNPLANNED$' stdout
 grep '^ERROR: all\.test 2 # UNPLANNED$' stdout
diff --git a/t/tap-planskip-whitespace.sh b/t/tap-planskip-whitespace.sh
index 9513ca2..39110ea 100644
--- a/t/tap-planskip-whitespace.sh
+++ b/t/tap-planskip-whitespace.sh
@@ -34,10 +34,7 @@ cat > baz.test <<END
 1..0 #  SKIP${tab}  Strip${tab}external  preserve ${tab}middle  ${tab}${sp}
 END
 
-run_make TESTS='foo.test bar.test baz.test' check > stdout \
-  || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O TESTS='foo.test bar.test baz.test' check
 count_test_results total=3 pass=0 fail=0 error=0 xpass=0 xfail=0 skip=3
 
 grep "SKIP: foo\\.test - Strip leading & trailing$" stdout
diff --git a/t/tap-planskip.sh b/t/tap-planskip.sh
index d0ab692..71cacf4 100644
--- a/t/tap-planskip.sh
+++ b/t/tap-planskip.sh
@@ -56,10 +56,8 @@ cat > mu.test <<END
 1..0 # SKIP $weirdchars
 END
 
-run_make TESTS='foo.test bar.test baz.test wget.test curl.test mu.test' \
-  check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check \
+  TESTS='foo.test bar.test baz.test wget.test curl.test mu.test'
 count_test_results total=6 pass=0 fail=0 xpass=0 xfail=0 skip=6 error=0
 
 # Look for a regression where the "1..0" wasn't being stripped from the
diff --git a/t/tap-recheck-logs.sh b/t/tap-recheck-logs.sh
index a4d52aa..8503ef1 100644
--- a/t/tap-recheck-logs.sh
+++ b/t/tap-recheck-logs.sh
@@ -65,8 +65,7 @@ test -f baz.log
 
 rm -f foo.log bar.log
 
-run_make RECHECK_LOGS= check > stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=
 test -f foo.log
 test -f bar.log
 grep '^PASS: foo\.test 1$' stdout
@@ -80,8 +79,7 @@ touch foo.test
 # We re-run only a successful test, but the tests that failed in the
 # previous run should still be taken into account, and cause an overall
 # failure.
-run_make RECHECK_LOGS= check > stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=
 grep '^PASS: foo\.test 1$' stdout
 grep '^PASS: foo\.test 2$' stdout
 grep 'ba[rz]\.test' stdout && exit 1
@@ -90,8 +88,7 @@ grep_summary
 
 $sleep
 touch zardoz
-run_make RECHECK_LOGS= check > stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=
 grep '^ERROR: baz\.test' stdout
 $EGREP '(foo|bar)\.test' stdout && exit 1
 is_newest baz.log zardoz
@@ -99,16 +96,14 @@ grep_summary
 
 # Now, explicitly retry with all test logs already updated, and ensure
 # that the summary is still displayed.
-run_make RECHECK_LOGS= check > stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=
 $EGREP '(foo|bar|baz)\.test' stdout && exit 1
 grep_summary
 
 # The following should re-run foo.test (and only foo.test), even if its
 # log file is up-to-date.
 : > older
-run_make RECHECK_LOGS=foo.log check > stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=foo.log
 grep '^PASS: foo\.test 1$' stdout
 grep '^PASS: foo\.test 2$' stdout
 grep 'ba[rz]\.test' stdout && exit 1
diff --git a/t/tap-recheck.sh b/t/tap-recheck.sh
index 481f46c..4a8bbc4 100644
--- a/t/tap-recheck.sh
+++ b/t/tap-recheck.sh
@@ -85,13 +85,13 @@ $AUTOMAKE
 do_recheck ()
 {
   case $* in
-    --fail) on_bad_rc='&&';;
-    --pass) on_bad_rc='||';;
+    --fail) status=FAIL;;
+    --pass) status=0;;
          *) fatal_ "invalid usage of function 'do_recheck'";;
   esac
   rm -f *.run
-  eval "\$MAKE recheck >stdout $on_bad_rc { cat stdout; ls -l; exit 1; }; :"
-  cat stdout; ls -l
+  run_make -O -e $status recheck || { ls -l; exit 1; }
+  ls -l
 }
 
 for vpath in : false; do
@@ -119,8 +119,7 @@ for vpath in : false; do
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
 
   : Run the tests for the first time.
-  $MAKE check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   ls -l
   # All the test scripts should have run.
   test -f a.run
diff --git a/t/tap-result-comment.sh b/t/tap-result-comment.sh
index 6c14506..0ca2d21 100644
--- a/t/tap-result-comment.sh
+++ b/t/tap-result-comment.sh
@@ -30,9 +30,7 @@ not ok #    TOD${tab}
 ok 5 # ${tab}${tab}TOOD${tab}${sp}${sp}
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=5 pass=3 fail=2 xpass=0 xfail=0 skip=0 error=0
 
 # Don't be too strict about trailing white space.
diff --git a/t/tap-signal.tap b/t/tap-signal.tap
index 2d49389..27e23ab 100644
--- a/t/tap-signal.tap
+++ b/t/tap-signal.tap
@@ -108,13 +108,12 @@ signal_caught ()
 
 command_ok_ '"make check" fails' eval '
   (
-    st=0; $MAKE check >stdout || st=$?
-    cat stdout
+    run_make -e IGNORE -O check
     # Extra "echo" and silencing of xtraces required to avoid possible
     # garbled output with NetBSD make, which would miss some final
     # newlines in the expected places and thus mess up our TAP output.
     set +x; echo
-    test $st -gt 0
+    test $am_make_rc_got -gt 0
   )
 '
 cat stdout # For debugging.
@@ -130,8 +129,7 @@ done
 
 echo 'TEST_LOG_DRIVER_FLAGS = --ignore-exit' >> Makefile
 
-command_ok_ '"make check" passes [--ignore-exit]' eval '$MAKE check >stdout'
-cat stdout # For debugging.
+command_ok_ '"make check" passes [--ignore-exit]' run_make -O check
 
 command_ok_ "count of test results [--ignore-exit]" count_test_results \
   total=$results_count pass=$results_count \
diff --git a/t/tap-test-number-0.sh b/t/tap-test-number-0.sh
index a42ff54..b5b161b 100644
--- a/t/tap-test-number-0.sh
+++ b/t/tap-test-number-0.sh
@@ -70,10 +70,7 @@ cat > e.test <<END
 ok 0 # TODO
 END
 
-run_make TESTS='a.test b.test c.test d.test e.test' check >stdout \
-  && { cat stdout; exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='a.test b.test c.test d.test e.test' check
 count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=5
 
 grep '^ERROR: a\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout
diff --git a/t/tap-todo-skip-together.sh b/t/tap-todo-skip-together.sh
index c9a339e..a7d052c 100644
--- a/t/tap-todo-skip-together.sh
+++ b/t/tap-todo-skip-together.sh
@@ -28,9 +28,7 @@ ok 1 # SKIP TODO
 not ok 2 # TODO SKIP
 END
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=1 skip=1 error=0
 
 grep '^SKIP: all\.test 1 ' stdout
diff --git a/t/tap-todo-skip-whitespace.sh b/t/tap-todo-skip-whitespace.sh
index c4c47d9..55e4b8f 100644
--- a/t/tap-todo-skip-whitespace.sh
+++ b/t/tap-todo-skip-whitespace.sh
@@ -68,8 +68,8 @@ my_make_check ()
     *) fatal_ "bad argument '$1' for my_make_check";;
   esac
   cat all.test
-  $MAKE check >stdout || : # Don't care about the exit status in this test.
-  cat stdout
+  # We don't care about the exit status in this test.
+  run_make -O -e IGNORE check
   count_test_results total=15 pass=0 fail=0 error=0 \
                      xpass=$xpass xfail=$xfail skip=$skip
   # Don't be too strict w.r.t. possible normalization of "TODO: foo" into
diff --git a/t/tap-todo-skip.sh b/t/tap-todo-skip.sh
index 7cbb170..4a68416 100644
--- a/t/tap-todo-skip.sh
+++ b/t/tap-todo-skip.sh
@@ -60,9 +60,7 @@ done; done; done; done; done >> all.test
 
 cat all.test # For debugging.
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=256 pass=0 fail=0 xpass=0 xfail=128 skip=128 error=0
 
 # -------------------------------------------------------- #
@@ -82,9 +80,7 @@ ok 8 - SKIP
 ok 9
 END
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=9 pass=9 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 :
diff --git a/t/tap-unplanned.sh b/t/tap-unplanned.sh
index 11b68a3..c6521b0 100644
--- a/t/tap-unplanned.sh
+++ b/t/tap-unplanned.sh
@@ -26,8 +26,7 @@ cat > all.test <<END
 ok 1
 ok 2
 END
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=2
 grep '^ERROR: all\.test - too many tests run (expected 1, got 2)$' stdout
 grep '^ERROR: all\.test 2 # UNPLANNED$' stdout
@@ -38,8 +37,7 @@ ok 1
 ok 2
 ok 3
 END
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=4 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=2
 grep '^ERROR: all\.test - too many tests run (expected 2, got 3)$' stdout
 grep '^ERROR: all\.test 3 # UNPLANNED$' stdout
@@ -53,8 +51,7 @@ ok 3
 not ok 4
 ok 5 # SKIP
 END
-run_make XFAIL_TESTS=all.test check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL XFAIL_TESTS=all.test check
 count_test_results total=6 pass=0 fail=0 xpass=0 xfail=1 skip=1 error=4
 grep '^ERROR: all\.test - too many tests run (expected 2, got 5)$' stdout
 grep '^ERROR: all\.test 3 # UNPLANNED$' stdout
@@ -120,8 +117,7 @@ cat > t <<END
 
 END
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=22 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=21
 
 echo 'PASS: all.test 1' > exp
@@ -146,8 +142,7 @@ for x in 'ok' 'ok 3' 'not ok' 'not ok # TODO' 'ok # TODO' 
'ok # SKIP'; do
     $x
     1..2
 END
-  $MAKE check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   test $($FGREP -c ': all.test' stdout) -eq 4
   $EGREP '^PASS: all\.test 1($| )' stdout
   $EGREP '^SKIP: all\.test 2($| )' stdout
diff --git a/t/tap-whitespace-normalization.sh 
b/t/tap-whitespace-normalization.sh
index 8ed7328..65bc2fe 100644
--- a/t/tap-whitespace-normalization.sh
+++ b/t/tap-whitespace-normalization.sh
@@ -146,10 +146,9 @@ chmod a+x *.test
 
 . tap-setup.sh
 
-# Don't care about exit status or number of test results, they should be
-# checked for in many other tests.
-$MAKE check >stdout || :
-cat stdout
+# We don't care about exit status or number of test results, they
+# should be checked for in many other tests.
+run_make -O -e FAIL check
 
 LC_ALL=C sort exp > t
 mv -f t exp
diff --git a/t/tap-with-and-without-number.sh b/t/tap-with-and-without-number.sh
index 87e4872..6b3b224 100644
--- a/t/tap-with-and-without-number.sh
+++ b/t/tap-with-and-without-number.sh
@@ -34,8 +34,7 @@ ok 6 # SKIP
 ok zardoz
 END
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 count_test_results total=7 pass=4 fail=0 xpass=0 xfail=2 skip=1 error=0
 
 grep '^PASS: all\.test 1 foo$' stdout
diff --git a/t/test-driver-acsubst.sh b/t/test-driver-acsubst.sh
index 2e70dfd..85113a4 100644
--- a/t/test-driver-acsubst.sh
+++ b/t/test-driver-acsubst.sh
@@ -75,13 +75,12 @@ END
 chmod a+x foo bar.test baz.sh
 
 $MAKE check-autodefs
-st=0; $MAKE check >stdout || st=$?
-cat stdout
+run_make -O -e IGNORE check
 cat test-suite.log
 cat foo.log
 cat bar.log
 cat baz.log
-test $st -eq 0 || exit 1
+test $am_make_rc_got -eq 0
 count_test_results total=3 pass=1 fail=0 skip=1 xfail=1 xpass=0 error=0
 
 :
diff --git a/t/test-driver-custom-multitest-recheck.sh 
b/t/test-driver-custom-multitest-recheck.sh
index 148553f..f814ee5 100644
--- a/t/test-driver-custom-multitest-recheck.sh
+++ b/t/test-driver-custom-multitest-recheck.sh
@@ -86,13 +86,13 @@ $AUTOMAKE
 do_recheck ()
 {
   case $* in
-    --fail) on_bad_rc='&&';;
-    --pass) on_bad_rc='||';;
+    --fail) status=FAIL;;
+    --pass) status=0;;
          *) fatal_ "invalid usage of function 'do_recheck'";;
   esac
   rm -f *.run
-  eval "\$MAKE recheck >stdout $on_bad_rc { cat stdout; ls -l; exit 1; }; :"
-  cat stdout; ls -l
+  run_make -O -e $status recheck || { ls -l; exit 1; }
+  ls -l
 }
 
 for vpath in : false; do
@@ -121,8 +121,7 @@ for vpath in : false; do
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
 
   : Run the tests for the first time.
-  $MAKE check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   ls -l
   # All the test scripts should have run.
   test -f a.run
diff --git a/t/test-driver-custom-multitest-recheck2.sh 
b/t/test-driver-custom-multitest-recheck2.sh
index 0c435de..7340c4d 100644
--- a/t/test-driver-custom-multitest-recheck2.sh
+++ b/t/test-driver-custom-multitest-recheck2.sh
@@ -83,8 +83,7 @@ for vpath in : false; do
   $srcdir/configure
 
   : Run the tests for the first time.
-  run_make check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   # All the test scripts should have run.
   test -f a.run
   test -f b.run
@@ -95,8 +94,7 @@ for vpath in : false; do
 
   : An empty '$(TESTS)' or '$(TEST_LOGS)' means that no test should be run.
   for var in TESTS TEST_LOGS; do
-    run_make "$var=" recheck >stdout || { cat stdout; exit 1; }
-    cat stdout
+    run_make -O "$var=" recheck
     count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
     test ! -e a.run
     test ! -e b.run
@@ -106,9 +104,7 @@ for vpath in : false; do
 
   : a.test was successful the first time, no need to re-run it.
   using_gmake || $sleep # Required by BSD make.
-  run_make TESTS=a.test recheck >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O TESTS=a.test recheck
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
   test ! -e a.run
   test ! -e b.run
@@ -117,9 +113,7 @@ for vpath in : false; do
   : b.test failed, it should be re-run.  And make it pass this time.
   using_gmake || $sleep # Required by BSD make.
   echo OK > b.ok
-  run_make TEST_LOGS=b.log recheck >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O TEST_LOGS=b.log recheck
   test ! -e a.run
   test -f b.run
   test ! -e c.run
@@ -129,17 +123,13 @@ for vpath in : false; do
 
   : No need to re-run a.test or b.test anymore.
   using_gmake || $sleep # Required by BSD make.
-  run_make TEST_LOGS=b.log recheck >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O TEST_LOGS=b.log recheck
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
   test ! -e a.run
   test ! -e b.run
   test ! -e c.run
   using_gmake || $sleep # Required by BSD make.
-  run_make TESTS='a.test b.test' recheck >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O TESTS='a.test b.test' recheck
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
   test ! -e a.run
   test ! -e b.run
@@ -149,9 +139,7 @@ for vpath in : false; do
   : as it contained an XPASS.  And this time, make it fail with
   : an hard error.
   echo dummy > c.err
-  run_make TEST_LOGS='a.log c.log' recheck >stdout \
-    && { cat stdout; exit 1; }
-  cat stdout
+  run_make -e FAIL -O TEST_LOGS='a.log c.log' recheck
   count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1
   test ! -e a.run
   test ! -e b.run
@@ -164,9 +152,7 @@ for vpath in : false; do
   # Use 'echo', not ':'; see comments above for why.
   using_gmake || $sleep # Required by BSD make.
   echo dummy > c.ok
-  run_make TESTS='c.test a.test' recheck >stdout \
-    || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O TESTS='c.test a.test' recheck
   count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
   test ! -e a.run
   test ! -e b.run
@@ -177,8 +163,7 @@ for vpath in : false; do
   : Nothing should be rerun anymore, as all tests have been eventually
   : successful.
   using_gmake || $sleep # Required by BSD make.
-  run_make recheck >stdout || { cat stdout; exit 1; }
-  cat stdout
+  run_make -O recheck
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
   test ! -e a.run
   test ! -e b.run
diff --git a/t/test-driver-custom-multitest.sh 
b/t/test-driver-custom-multitest.sh
index a21174a..2908a23 100644
--- a/t/test-driver-custom-multitest.sh
+++ b/t/test-driver-custom-multitest.sh
@@ -119,8 +119,7 @@ for vpath in : false; do
 
   $srcdir/configure
 
-  $MAKE check >stdout && { cat stdout; cat test-suite.log; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check || { cat test-suite.log; exit 1; }
   cat test-suite.log
   # Couple of sanity checks.  These might need to be updated if the
   # 'trivial-test-driver' script is changed.
@@ -158,10 +157,8 @@ for vpath in : false; do
   grep '%% pass-xpass-fail-xfail-skip-error %%' test-suite.log
   test $(grep -c '%% ' test-suite.log) -eq 4
 
-  run_make TESTS='pass.t pass3-skip2-xfail.t' check >stdout \
-    || { cat stdout; cat test-suite.log; exit 1; }
+  run_make -O TESTS='pass.t pass3-skip2-xfail.t' check
   cat test-suite.log
-  cat stdout
   count_test_results total=7 pass=4 fail=0 skip=2 xfail=1 xpass=0 error=0
 
   cd $srcdir
diff --git a/t/test-driver-custom-xfail-tests.sh 
b/t/test-driver-custom-xfail-tests.sh
index 6ecb896..a7828c0 100644
--- a/t/test-driver-custom-xfail-tests.sh
+++ b/t/test-driver-custom-xfail-tests.sh
@@ -141,8 +141,7 @@ $AUTOMAKE
 
 ./configure
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 test $(grep -c '^PASS:'  stdout) -eq 3
 test $(grep -c '^XFAIL:' stdout) -eq 13
 
@@ -150,8 +149,7 @@ for dir in sub1 sub2; do
   cd $dir
   cp pass.test x1.test
   cp x2.test pass.test
-  $MAKE check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   test "$(cat pass.trs)" = ":test-result: FAIL"
   test "$(cat x1.trs)"   = ":test-result: XPASS"
   test "$(cat x2.trs)"   = ":test-result: XFAIL"
diff --git a/t/test-log.sh b/t/test-log.sh
index f0da927..fd54d6a 100644
--- a/t/test-log.sh
+++ b/t/test-log.sh
@@ -146,8 +146,7 @@ test -f global.log
 
 rm -f *.log
 
-VERBOSE=yes $MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check VERBOSE=yes
 cat global.log
 test ! -e my.log
 test ! -e test-suite.log
diff --git a/t/test-metadata-results.sh b/t/test-metadata-results.sh
index f0a19dc..9fc065e 100644
--- a/t/test-metadata-results.sh
+++ b/t/test-metadata-results.sh
@@ -49,15 +49,17 @@ chmod a+x dummy-driver
 
 mk_check ()
 {
-  st=0
-  $MAKE check >stdout || st=$?
-  cat stdout
+  stat=0
+  case $1 in
+    -e) stat=$2; shift 2;;
+  esac
+  run_make -O -e $stat -- check
   # Our dummy driver make no testsuite progress report.
   grep ': .*\.test' stdout && exit 1
   # Nor it writes to the log files.
   test -s foo.log && exit 1
   test -s bar.log && exit 1
-  return $st
+  : For 'set -e'.
 }
 
 # This must be different from the one defined in 'test/defs', as that
@@ -99,7 +101,7 @@ cat > bar.test <<END
 :test-result: SKIP
 :test-global-result: ERROR
 END
-mk_check && exit 1
+mk_check -e FAIL
 count_test_results total=2 pass=0 fail=1 xpass=0 xfail=0 skip=1 error=0
 
 cat > foo.test <<END
@@ -118,7 +120,7 @@ END
 cat > bar.test <<END
 :test-global-result: PASS
 END
-mk_check && exit 1
+mk_check -e FAIL
 count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
 
 cat > foo.test <<END
@@ -147,11 +149,11 @@ cat > foo.test <<END
 :test-result: ERROR
 END
 : > bar.test
-mk_check && exit 1
+mk_check -e FAIL
 count_test_results total=6 pass=1 fail=1 xpass=1 xfail=1 skip=1 error=1
 
 cp foo.test bar.test
-mk_check && exit 1
+mk_check -e FAIL
 count_test_results total=12 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=2
 
 # Check that we are liberal w.r.t. whitespace use.
@@ -169,7 +171,7 @@ END
 done
 cat foo.test # For debugging.
 cat bar.test # Likewise.
-mk_check && exit 1
+mk_check -e FAIL
 count_test_results total=30 pass=5 fail=5 xpass=5 xfail=5 skip=5 error=5
 
 :
diff --git a/t/test-missing.sh b/t/test-missing.sh
index b3d42d9..1c7df04 100644
--- a/t/test-missing.sh
+++ b/t/test-missing.sh
@@ -37,24 +37,17 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE check >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -e FAIL -M check
 test -f ok.log
 grep '^PASS: ok\.test' output
 $FGREP 'zardoz.log' output
 test ! -e test-suite.log
 
-# FIXME: this redirection is fishy... run_make needs to be enhanced
-run_make TESTS='zardoz2.test' check >output 2>&1 \
-  && { cat output; exit 1; }
-cat output
+run_make -M -e FAIL TESTS='zardoz2.test' check
 $FGREP 'zardoz2.log' output
 test ! -e test-suite.log
 
-# FIXME: this redirection is fishy... run_make needs to be enhanced
-run_make TEST_LOGS='zardoz3.log' check >output 2>&1 \
-  && { cat output; exit 1; }
-cat output
+run_make -M -e FAIL TEST_LOGS='zardoz3.log' check
 $FGREP 'zardoz3.log' output
 test ! -e test-suite.log
 
@@ -65,8 +58,7 @@ test ! -e test-suite.log
 $MAKE check
 rm -f zardoz.test
 
-$MAKE check >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -M -e FAIL check
 $FGREP 'zardoz.log' output
 test ! -e test-suite.log
 
diff --git a/t/test-missing2.sh b/t/test-missing2.sh
index 2c0e547..9bc2812 100644
--- a/t/test-missing2.sh
+++ b/t/test-missing2.sh
@@ -42,8 +42,7 @@ test ! -e foobar1.trs || exit 99
 test ! -e foobar2.log || exit 99
 test ! -e foobar2.trs || exit 99
 
-$MAKE check >output 2>&1 && { cat output; exit 1; }
-cat output
+run_make -e FAIL -M check
 grep 'test-suite\.log.*foobar1\.log' output
 grep 'test-suite\.log.*foobar1\.trs' output
 grep 'test-suite\.log.*foobar2\.log' output
diff --git a/t/test-trs-recover.sh b/t/test-trs-recover.sh
index d833d96..4585788 100644
--- a/t/test-trs-recover.sh
+++ b/t/test-trs-recover.sh
@@ -65,8 +65,7 @@ test ! -e baz.trs
 
 : Recreate by hand, with a failing test.
 rm -f foo.trs bar.trs
-TEST_STATUS=1 $MAKE bar.trs baz.trs >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O TEST_STATUS=1 bar.trs baz.trs
 test ! -e foo.trs
 test -f bar.trs
 test -f baz.trs
@@ -86,7 +85,7 @@ is_newest baz.trs stamp
 : ensure that also up-to-date '.trs' files are remade -- this time we
 : grep the "make check" output verify that.
 rm -f foo.trs bar.trs
-TEST_STATUS=1 $MAKE check >stdout && { cat stdout; exit 1; }
+run_make -O -e FAIL TEST_STATUS=1 check
 test -f foo.trs
 test -f bar.trs
 grep '^FAIL: foo\.test' stdout
@@ -109,8 +108,7 @@ test ! -e baz.trs
 
 : Interactions with "make recheck" are OK.
 rm -f foo.trs bar.trs baz.log baz.trs
-$MAKE recheck >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O recheck
 test -f foo.trs
 test -f bar.trs
 test ! -e baz.trs
@@ -130,8 +128,7 @@ test -f baz.trs
 : '.trs' files are *not* remade.
 update_stamp
 rm -f foo.trs bar.trs test-suite.log
-$MAKE test-suite.log >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O test-suite.log
 grep '^PASS: foo\.test' stdout
 grep '^PASS: bar\.test' stdout
 grep 'baz\.test' stdout && exit 1
@@ -152,8 +149,7 @@ test -f baz.trs
 rm -f foo.trs
 update_stamp
 touch bar.test
-run_make RECHECK_LOGS= check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O RECHECK_LOGS= check
 # Check that make has updated what it needed to, but no more.
 test -f foo.trs
 is_newest bar.trs bar.test
diff --git a/t/test-trs-recover2.sh b/t/test-trs-recover2.sh
index f650961..f996a5c 100644
--- a/t/test-trs-recover2.sh
+++ b/t/test-trs-recover2.sh
@@ -69,8 +69,7 @@ test -r bar.trs
 : Again, but using "make recheck" this time.
 rm -f foo.trs
 chmod a-r bar.trs
-$MAKE recheck >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O recheck
 test -f foo.trs
 test -r foo.trs
 test -f bar.trs
@@ -81,8 +80,7 @@ grep '^PASS: bar\.test' stdout
 : Recreate by remaking the global test log.
 chmod a-r foo.trs
 rm -f test-suite.log
-$MAKE test-suite.log >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O test-suite.log
 test -f foo.trs
 test -r foo.trs
 grep '^PASS: foo\.test' stdout
@@ -107,8 +105,7 @@ $sleep
 touch stamp
 $sleep
 touch bar.test
-run_make RECHECK_LOGS= check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O RECHECK_LOGS= check
 test -r foo.trs
 is_newest bar.trs bar.test
 grep '^PASS: foo\.test' stdout
diff --git a/t/testsuite-summary-count-many.sh 
b/t/testsuite-summary-count-many.sh
index 8bb34f3..094b937 100644
--- a/t/testsuite-summary-count-many.sh
+++ b/t/testsuite-summary-count-many.sh
@@ -91,7 +91,7 @@ $AUTOCONF
 
 ./configure
 
-($MAKE check || : > make.fail) | tee stdout
+($MAKE check || touch make.fail) | tee stdout
 test -f make.fail
 
 $PERL extract-testsuite-summary.pl stdout > summary.got
diff --git a/t/testsuite-summary-reference-log.sh 
b/t/testsuite-summary-reference-log.sh
index 2f2533f..379f42b 100644
--- a/t/testsuite-summary-reference-log.sh
+++ b/t/testsuite-summary-reference-log.sh
@@ -45,13 +45,11 @@ cd build
 
 ../configure
 
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 grep '^See \./my_test_suite\.log$' stdout
 
 mkdir bar
-run_make TEST_SUITE_LOG=bar/bar.log check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TEST_SUITE_LOG=bar/bar.log check
 grep '^See \./bar/bar\.log$' stdout
 
 cd ..
@@ -71,17 +69,14 @@ $AUTOCONF --force
 $AUTOMAKE
 
 ./configure
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 grep '^See sub/test-suite\.log$' stdout
 cd sub
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 grep '^See sub/test-suite\.log$' stdout
 cd ..
 
-run_make TEST_SUITE_LOG=foo.log check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL TEST_SUITE_LOG=foo.log check
 grep '^See sub/foo\.log$' stdout
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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