automake-patches
[Top][All Lists]
Advanced

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

tests/defs.in: AUTOMAKE_fails shell function


From: Alexandre Duret-Lutz
Subject: tests/defs.in: AUTOMAKE_fails shell function
Date: Thu, 03 Jul 2003 10:06:36 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

This adds a shell function to check Automake failures, as mentioned
in a previous thread.
  http://mail.gnu.org/archive/html/automake-patches/2003-06/msg00021.html

I've edited all instances of '$AUTOMAKE && exit 1', changed them
to call AUTOMAKE_fails, and to grep for the error message.

AUTOMAKE_fails ensures the exit code is 1.  The plan (Akim's) is
to use another exit code for Perl's warnings so that the test
suite can detect Perl issues even in expected Automake failures.
I'll do this separately.

2003-07-03  Alexandre Duret-Lutz  <address@hidden>

        * Makefile.am (maintainer-clean): Disallow '$AUTOMAKE && exit 1'.
        Ignore @...@ substitutions in comments.
        * tests/defs.in: Try to make the shell more POSIX compliant.
        (AUTOMAKE_run, AUTOMAKE_fails): New functions.
        * tests/README: Mention AUTOMAKE_fails.
        * tests/alloca.test, tests/alloca2.test, tests/ansi8.test,
        * tests/asm.test, tests/backsl3.test, tests/backsl4.test,
        * tests/badline.test, tests/badopt.test, tests/canon.test,
        * tests/canon5.test, tests/colneq.test, tests/comment3.test,
        * tests/comment5.test, tests/cond2.test, tests/cond20.test,
        * tests/cond23.test, tests/cond24.test, tests/cond27.test,
        * tests/condinc2.test, tests/conff2.test, tests/cxx2.test,
        * tests/dejagnu2.test, tests/dirforbid.test,
        * tests/distcom3.test, tests/else.test, tests/exdir2.test,
        * tests/exeext2.test, tests/gcj2.test, tests/gcj5.test,
        * tests/getopt.test, tests/gettext.test, tests/gettext2.test,
        * tests/gnits.test, tests/gnuwarn.test, tests/gnuwarn2.test,
        * tests/insh.test, tests/lex2.test, tests/libobj10.test,
        * tests/libobj12.test, tests/libobj13.test,
        * tests/libobj3.test, tests/library2.test,
        * tests/library3.test, tests/libtool4.test,
        * tests/libtool6.test, tests/lisp2.test, tests/location.test,
        * tests/nogzip2.test, tests/output5.test, tests/overrid.test,
        * tests/percent.test, tests/percent2.test,
        * tests/pluseq5.test, tests/pluseq7.test, tests/pluseq9.test,
        * tests/pr211.test, tests/primary.test, tests/primary2.test,
        * tests/python2.test, tests/recurs.test, tests/reqd2.test,
        * tests/seenc.test, tests/specflg.test, tests/specflg2.test,
        * tests/spell.test, tests/spell2.test, tests/srcsub.test,
        * tests/srcsub2.test, tests/stdlib.test, tests/subdir7.test,
        * tests/substtarg.test, tests/suffix11.test,
        * tests/symlink.test, tests/syntax.test,
        * tests/targetclash.test, tests/txinfo4.test,
        * tests/version3.test, tests/warnopts.test,
        * tests/xsource.test, tests/yacc2.test: Use set -e,
        AUTOMAKE_fails, and always grep error message.

Index: Makefile.am
===================================================================
RCS file: /cvs/automake/automake/Makefile.am,v
retrieving revision 1.214
diff -u -r1.214 Makefile.am
--- Makefile.am 22 May 2003 17:50:10 -0000      1.214
+++ Makefile.am 3 Jul 2003 07:56:18 -0000
@@ -190,6 +190,11 @@
          echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" 
instead.' 1>&2;  \
          exit 1; \
        fi
+## Use AUTOMAKE_fails when appropriate
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep '\$$AUTOMAKE.*&&.*exit'; 
then \
+         echo 'Use AUTOMAKE_fails + grep to catch automake failures in the 
above tests.' 1>&2;  \
+         exit 1; \
+       fi
 ## Tests should never call aclocal directly.
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*aclocal'; 
then \
          echo 'Do not run "aclocal" in the above tests.  Use "$$ACLOCAL" 
instead.' 1>&2;  \
@@ -236,12 +241,11 @@
        fi
 ## Try to make sure all @...@ substitutions are covered by our
 ## substitution rule.
-       @if test `grep -E '@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
+       @if test `grep -E 'address@hidden@' aclocal | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in aclocal" 1>&2; \
          exit 1; \
        fi
-## In automake there are a few valid ones.
-       @if test `grep -E '@[A-Za-z_0-9]+@' automake | wc -l` -ne 5; then \
+       @if test `grep -E 'address@hidden@' automake | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in automake" 1>&2; \
          exit 1; \
        fi
Index: tests/defs.in
===================================================================
RCS file: /cvs/automake/automake/tests/defs.in,v
retrieving revision 1.16
diff -u -r1.16 defs.in
--- tests/defs.in       18 Apr 2003 19:59:31 -0000      1.16
+++ tests/defs.in       3 Jul 2003 07:56:22 -0000
@@ -22,6 +22,18 @@
 # Defines for Automake testing environment.
 # Tom Tromey <address@hidden>
 
+# Be Bourne compatible.
+# (Snippet copied from configure's initialization in Autoconf 2.57.)
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
 # Ensure we are running from the right directory.
 test -f ./defs || {
    echo "defs: not found in current directory" 1>&2
@@ -296,6 +308,30 @@
 # to override the definition from the Makefile.
 testsrcdir=$srcdir
 unset srcdir
+
+# AUTOMAKE_run status [options...]
+# --------------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_run ()
+{
+  expected_exitcode=$1
+  shift
+  exitcode=0
+  $AUTOMAKE ${1+"$@"} 2>stderr >stdout || exitcode=$?
+  cat stderr
+  cat stdout
+  test $exitcode = $expected_exitcode || exit 1
+}
+
+# AUTOMAKE_fails [options...]
+# ---------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_fails ()
+{
+  AUTOMAKE_run 1 ${1+"$@"}
+}
 
 # Turn on shell traces when VERBOSE=x.
 if test "x$VERBOSE" = xx; then
Index: tests/README
===================================================================
RCS file: /cvs/automake/automake/tests/README,v
retrieving revision 1.2
diff -u -r1.2 README
--- tests/README        13 Mar 2003 20:33:05 -0000      1.2
+++ tests/README        3 Jul 2003 07:56:21 -0000
@@ -111,8 +111,7 @@
   Do not test an Automake error with `$AUTOMAKE && exit 1', or in three
   years we'll discover that this test failed for some other bogus reason.
   This happened many times.  Better use something like
-     $AUTOMAKE 2>stderr && exit 1
-     cat stderr
+     AUTOMAKE_fails
      grep 'expected diagnostic' stderr
   (Note this doesn't prevent the test from failing for another
   reason, but at least it makes sure the original error is still
Index: tests/alloca.test
===================================================================
RCS file: /cvs/automake/automake/tests/alloca.test,v
retrieving revision 1.1
diff -u -r1.1 alloca.test
--- tests/alloca.test   23 Jun 2003 21:39:54 -0000      1.1
+++ tests/alloca.test   3 Jul 2003 07:56:21 -0000
@@ -31,7 +31,6 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'Makefile.am:1:.*AC_PROG_RANLIB' stderr
 grep 'Makefile.am:3:.*AC_FUNC_ALLOCA' stderr
Index: tests/alloca2.test
===================================================================
RCS file: /cvs/automake/automake/tests/alloca2.test,v
retrieving revision 1.1
diff -u -r1.1 alloca2.test
--- tests/alloca2.test  23 Jun 2003 21:39:54 -0000      1.1
+++ tests/alloca2.test  3 Jul 2003 07:56:21 -0000
@@ -31,7 +31,6 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'Makefile.am:1:.*AC_PROG_LIBTOOL' stderr
 grep 'Makefile.am:3:.*ALLOCA' stderr
Index: tests/ansi8.test
===================================================================
RCS file: /cvs/automake/automake/tests/ansi8.test,v
retrieving revision 1.2
diff -u -r1.2 ansi8.test
--- tests/ansi8.test    8 Sep 2002 13:07:55 -0000       1.2
+++ tests/ansi8.test    3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -30,6 +30,5 @@
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_C_PROTOTYPES stderr
Index: tests/asm.test
===================================================================
RCS file: /cvs/automake/automake/tests/asm.test,v
retrieving revision 1.10
diff -u -r1.10 asm.test
--- tests/asm.test      10 Jan 2003 19:30:18 -0000      1.10
+++ tests/asm.test      3 Jul 2003 07:56:21 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -41,8 +41,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PROG_AS stderr
 
 # On fast machines the autom4te.cache created during the above run of
@@ -64,8 +63,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep CCAS stderr
 grep AM_PROG_AS stderr
 
@@ -83,8 +81,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep CCASFLAGS stderr
 grep AM_PROG_AS stderr
 
Index: tests/backsl3.test
===================================================================
RCS file: /cvs/automake/automake/tests/backsl3.test,v
retrieving revision 1.1
diff -u -r1.1 backsl3.test
--- tests/backsl3.test  25 Feb 2003 17:30:54 -0000      1.1
+++ tests/backsl3.test  3 Jul 2003 07:56:21 -0000
@@ -30,6 +30,6 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
+AUTOMAKE_fails
 cat stderr
 grep 'trailing backslash' stderr
Index: tests/backsl4.test
===================================================================
RCS file: /cvs/automake/automake/tests/backsl4.test,v
retrieving revision 1.1
diff -u -r1.1 backsl4.test
--- tests/backsl4.test  3 Apr 2003 21:38:39 -0000       1.1
+++ tests/backsl4.test  3 Jul 2003 07:56:21 -0000
@@ -42,8 +42,7 @@
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep ':1:.*whitespace' stderr
 grep ':5:.*whitespace' stderr
 ./configure
Index: tests/badline.test
===================================================================
RCS file: /cvs/automake/automake/tests/badline.test,v
retrieving revision 1.3
diff -u -r1.3 badline.test
--- tests/badline.test  8 Sep 2002 13:07:55 -0000       1.3
+++ tests/badline.test  3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,13 +23,17 @@
 
 . ./defs || exit 1
 
-cat >> configure.in << 'END'
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_SUBST(TEXINFOS)
+AC_CONFIG_FILES([Makefile])
 END
 
 : > Makefile.am
 
 $ACLOCAL || exit 1
-$AUTOMAKE > out 2>&1 && exit 1
-grep Makefile out && exit 1
-exit 0
+AUTOMAKE_fails
+grep 'configure.in:3:.*info_TEXINFOS' stderr
Index: tests/badopt.test
===================================================================
RCS file: /cvs/automake/automake/tests/badopt.test,v
retrieving revision 1.2
diff -u -r1.2 badopt.test
--- tests/badopt.test   8 Sep 2002 13:07:55 -0000       1.2
+++ tests/badopt.test   3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -26,5 +26,6 @@
 AUTOMAKE_OPTIONS = zardoz
 END
 
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep zardoz stderr
Index: tests/canon.test
===================================================================
RCS file: /cvs/automake/automake/tests/canon.test,v
retrieving revision 1.4
diff -u -r1.4 canon.test
--- tests/canon.test    8 Sep 2002 13:07:55 -0000       1.4
+++ tests/canon.test    3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo AC_PROG_CC >> configure.in
 
 cat > Makefile.am << 'END'
@@ -29,6 +31,6 @@
 sniff-glue_SOURCES = sg.c
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*sniff_glue_SOURCES' stderr
Index: tests/canon5.test
===================================================================
RCS file: /cvs/automake/automake/tests/canon5.test,v
retrieving revision 1.5
diff -u -r1.5 canon5.test
--- tests/canon5.test   8 Sep 2002 13:07:55 -0000       1.5
+++ tests/canon5.test   3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -19,10 +19,12 @@
 # Boston, MA 02111-1307, USA.
 
 # Test to make sure that we allow variable names starting in
-# non-letters.
+# non-letters.  Whatever that might mean.
 
 . ./defs || exit 1
 
+set -e
+
 echo AC_PROG_CC >> configure.in
 
 cat > Makefile.am << 'END'
@@ -30,7 +32,7 @@
 123test_SOURCES = 123.c
 END
 
-$ACLOCAL || exit 1
+$ACLOCAL
 $AUTOMAKE || exit 1
 
 cat > Makefile.am << 'END'
@@ -39,20 +41,21 @@
 END
 
 # Variables starting with `_' are not portable.
-$AUTOMAKE -Wno-portability || exit 1
+$AUTOMAKE -Wno-portability
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = ,foo
 ,foo_SOURCES = foo.c
 END
 
-# Variables starting with `_' are not portable.
-$AUTOMAKE -Wno-portability && exit 1
+# Variables starting with `,' are not portable.
+AUTOMAKE_fails -Wno-portability
+grep 'Makefile.am:2:.*_foo_SOURCES' stderr
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = ,foo
 _foo_SOURCES = foo.c
 END
 
-# Variables starting with `_' are not portable.
+# Variables starting with `_' or `,' are not portable.
 $AUTOMAKE -Wno-portability
Index: tests/colneq.test
===================================================================
RCS file: /cvs/automake/automake/tests/colneq.test,v
retrieving revision 1.5
diff -u -r1.5 colneq.test
--- tests/colneq.test   8 Sep 2002 19:28:44 -0000       1.5
+++ tests/colneq.test   3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -30,8 +30,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2> stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep ':=.*not portable' stderr
 
 echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
Index: tests/comment3.test
===================================================================
RCS file: /cvs/automake/automake/tests/comment3.test,v
retrieving revision 1.3
diff -u -r1.3 comment3.test
--- tests/comment3.test 8 Sep 2002 13:07:55 -0000       1.3
+++ tests/comment3.test 3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -25,11 +25,13 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 install-data-local:
        # Tru64 Unix must die
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*#' stderr
Index: tests/comment5.test
===================================================================
RCS file: /cvs/automake/automake/tests/comment5.test,v
retrieving revision 1.4
diff -u -r1.4 comment5.test
--- tests/comment5.test 28 Sep 2002 12:41:06 -0000      1.4
+++ tests/comment5.test 3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -40,8 +40,7 @@
 EOF
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep '^Makefile.am:5: blank line following trailing backslash' stderr
 
 
@@ -58,8 +57,7 @@
 var = foo
 EOF
 
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep '^Makefile.am:2: blank line following trailing backslash' stderr
 
 
@@ -71,8 +69,7 @@
 
 EOF
 
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep '^Makefile.inc:2: blank line following trailing backslash' stderr
 grep '^Makefile.am:1: .*included from here' stderr
 
Index: tests/cond2.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond2.test,v
retrieving revision 1.4
diff -u -r1.4 cond2.test
--- tests/cond2.test    8 Sep 2002 13:07:55 -0000       1.4
+++ tests/cond2.test    3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -40,6 +42,6 @@
 
 mkdir dir1
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'dir2.*does not exist' stderr
Index: tests/cond20.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond20.test,v
retrieving revision 1.3
diff -u -r1.3 cond20.test
--- tests/cond20.test   8 Sep 2002 13:07:55 -0000       1.3
+++ tests/cond20.test   3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -50,5 +50,5 @@
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a && exit 1
-$AUTOMAKE -a 2>&1| grep "recursively defined"
+AUTOMAKE_fails -a
+grep "recursively defined" stderr
Index: tests/cond23.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond23.test,v
retrieving revision 1.2
diff -u -r1.2 cond23.test
--- tests/cond23.test   8 Sep 2002 13:07:55 -0000       1.2
+++ tests/cond23.test   3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -37,5 +37,5 @@
 EOF
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
+AUTOMAKE_fails
 grep 'libdir was already defined' stderr
Index: tests/cond24.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond24.test,v
retrieving revision 1.2
diff -u -r1.2 cond24.test
--- tests/cond24.test   8 Sep 2002 13:07:55 -0000       1.2
+++ tests/cond24.test   3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -38,5 +38,5 @@
 EOF
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
+AUTOMAKE_fails
 grep 'foo was already defined' stderr
Index: tests/cond27.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond27.test,v
retrieving revision 1.2
diff -u -r1.2 cond27.test
--- tests/cond27.test   20 Nov 2002 22:03:57 -0000      1.2
+++ tests/cond27.test   3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -37,7 +37,6 @@
 EOF
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep ' USE_FOO' stderr && exit 1
 grep '!USE_FOO' stderr
Index: tests/condinc2.test
===================================================================
RCS file: /cvs/automake/automake/tests/condinc2.test,v
retrieving revision 1.1
diff -u -r1.1 condinc2.test
--- tests/condinc2.test 13 Jan 2003 19:17:53 -0000      1.1
+++ tests/condinc2.test 3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AM_CONDITIONAL(TOBE, false)
 END
@@ -38,6 +40,6 @@
 endif
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'adjunct:3: too many conditionals closed' stderr
Index: tests/conff2.test
===================================================================
RCS file: /cvs/automake/automake/tests/conff2.test,v
retrieving revision 1.1
diff -u -r1.1 conff2.test
--- tests/conff2.test   1 Jul 2003 21:25:39 -0000       1.1
+++ tests/conff2.test   3 Jul 2003 07:56:21 -0000
@@ -33,7 +33,6 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'configure.in:3:.*AC_CONFIG_FILES' stderr
 grep 'configure.in:4:.*AC_CONFIG_HEADERS' stderr
Index: tests/cxx2.test
===================================================================
RCS file: /cvs/automake/automake/tests/cxx2.test,v
retrieving revision 1.2
diff -u -r1.2 cxx2.test
--- tests/cxx2.test     8 Sep 2002 13:07:55 -0000       1.2
+++ tests/cxx2.test     3 Jul 2003 07:56:21 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -32,6 +32,5 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AC_PROG_CXX stderr
Index: tests/dejagnu2.test
===================================================================
RCS file: /cvs/automake/automake/tests/dejagnu2.test,v
retrieving revision 1.4
diff -u -r1.4 dejagnu2.test
--- tests/dejagnu2.test 14 Apr 2003 19:13:15 -0000      1.4
+++ tests/dejagnu2.test 3 Jul 2003 07:56:22 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -45,6 +45,5 @@
 cat stdout
 grep foo stdout
 
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'Makefile.am:3:.*site.exp' stderr
Index: tests/dirforbid.test
===================================================================
RCS file: /cvs/automake/automake/tests/dirforbid.test,v
retrieving revision 1.3
diff -u -r1.3 dirforbid.test
--- tests/dirforbid.test        8 Sep 2002 13:07:55 -0000       1.3
+++ tests/dirforbid.test        3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -36,7 +36,7 @@
 $i = foo
 END
   $ACLOCAL
-  # This strange syntax works around NetBSD Problem Report #11542.
-  $AUTOMAKE -a && exit 1 || :
+  AUTOMAKE_fails -a
+  grep 'Makefile.am:1:.*directory' stderr
 done
 :
Index: tests/distcom3.test
===================================================================
RCS file: /cvs/automake/automake/tests/distcom3.test,v
retrieving revision 1.1
diff -u -r1.1 distcom3.test
--- tests/distcom3.test 13 Jan 2003 19:17:53 -0000      1.1
+++ tests/distcom3.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -54,6 +54,5 @@
 
 # Should warn about missing README.
 : > Makefile.am
-$AUTOMAKE --add-missing --gnu 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing --gnu
 grep README stderr
Index: tests/else.test
===================================================================
RCS file: /cvs/automake/automake/tests/else.test,v
retrieving revision 1.3
diff -u -r1.3 else.test
--- tests/else.test     8 Sep 2002 13:07:55 -0000       1.3
+++ tests/else.test     3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo 'AM_CONDITIONAL(FOO, true)' >> configure.in
 
 cat > Makefile.am << 'END'
@@ -30,12 +32,12 @@
 
 # we only need to descend into the c dir if we're doing a 1.3 DSO configuration
 ifeq ("${APACHE_DIR_IS_SRC}","yes")
-SUBDIRS = java 
+SUBDIRS = java
 else
 SUBDIRS = c java
 endif
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE > out 2>&1 && exit 1
-grep :7: out
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:7:.*else without if' stderr
Index: tests/exdir2.test
===================================================================
RCS file: /cvs/automake/automake/tests/exdir2.test,v
retrieving revision 1.3
diff -u -r1.3 exdir2.test
--- tests/exdir2.test   8 Sep 2002 13:07:55 -0000       1.3
+++ tests/exdir2.test   3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,11 +22,14 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'EOF'
 html_DATA = zot.html
 pkgdata_DATA = qbert
 EOF
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'pkgdatadir' stderr && exit 1
+grep 'Makefile.am:1:.*htmldir.*undefined' stderr
Index: tests/exeext2.test
===================================================================
RCS file: /cvs/automake/automake/tests/exeext2.test,v
retrieving revision 1.4
diff -u -r1.4 exeext2.test
--- tests/exeext2.test  14 Apr 2003 19:13:15 -0000      1.4
+++ tests/exeext2.test  3 Jul 2003 07:56:22 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -39,11 +39,9 @@
 $ACLOCAL
 
 $AUTOMAKE -Wnone
-$AUTOMAKE -Wnone -Wobsolete 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -Wnone -Wobsolete
 grep 'deprecated.*maude' stderr
-$AUTOMAKE -Wall 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -Wall
 grep 'deprecated.*maude' stderr
 grep 'overrid.*maude' stderr
 
Index: tests/gcj2.test
===================================================================
RCS file: /cvs/automake/automake/tests/gcj2.test,v
retrieving revision 1.5
diff -u -r1.5 gcj2.test
--- tests/gcj2.test     8 Sep 2002 13:07:55 -0000       1.5
+++ tests/gcj2.test     3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 _AM_DEPENDENCIES(GCJ)
 AC_SUBST(GCJ)
@@ -32,6 +34,6 @@
 convert_SOURCES = x/../convert.java
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:.*\.\.' stderr
Index: tests/gcj5.test
===================================================================
RCS file: /cvs/automake/automake/tests/gcj5.test,v
retrieving revision 1.2
diff -u -r1.2 gcj5.test
--- tests/gcj5.test     8 Sep 2002 13:07:55 -0000       1.2
+++ tests/gcj5.test     3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -34,6 +34,5 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PROG_GCJ stderr
Index: tests/getopt.test
===================================================================
RCS file: /cvs/automake/automake/tests/getopt.test,v
retrieving revision 1.2
diff -u -r1.2 getopt.test
--- tests/getopt.test   8 Sep 2002 13:07:55 -0000       1.2
+++ tests/getopt.test   3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -26,24 +26,20 @@
 set -e
 
 # This is expected to fail ...
-$AUTOMAKE -Wnonexistant 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -Wnonexistant
 grep ':.*nonexistant' stderr
 
 # ... but this should not.
-$AUTOMAKE -Wnonexistant --help 2>stderr
-cat stderr
+AUTOMAKE_run 0 -Wnonexistant --help
 grep ':.*nonexistant' stderr && exit 1
 
 
 # Similarly, this should fail ...
-$AUTOMAKE --nonexistant 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --nonexistant 2>stderr
 grep ':.*nonexistant' stderr
 
 # ... but this should not.
-$AUTOMAKE --nonexistant --help 2>stderr
-cat stderr
+AUTOMAKE_run 0 --nonexistant --help
 grep ':.*nonexistant' stderr && exit 1
 
 :
Index: tests/gettext.test
===================================================================
RCS file: /cvs/automake/automake/tests/gettext.test,v
retrieving revision 1.4
diff -u -r1.4 gettext.test
--- tests/gettext.test  11 Feb 2003 19:32:36 -0000      1.4
+++ tests/gettext.test  3 Jul 2003 07:56:22 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -37,18 +37,15 @@
 
 # po/ and intl/ are required
 
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
 
 echo 'SUBDIRS = po' >Makefile.am
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*intl' stderr
 
 echo 'SUBDIRS = intl' >Makefile.am
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*po' stderr
 
 # Ok.
@@ -70,6 +67,5 @@
 # Still, SUBDIRS must be defined.
 
 : >Makefile.am
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
Index: tests/gettext2.test
===================================================================
RCS file: /cvs/automake/automake/tests/gettext2.test,v
retrieving revision 1.4
diff -u -r1.4 gettext2.test
--- tests/gettext2.test 11 Feb 2003 19:32:36 -0000      1.4
+++ tests/gettext2.test 3 Jul 2003 07:56:22 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -38,13 +38,11 @@
 
 # po/ is required, but intl/ isn't.
 
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
 
 echo 'SUBDIRS = foo' >Makefile.am
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*po' stderr
 
 # Ok.
@@ -61,6 +59,5 @@
 
 mkdir intl
 echo 'SUBDIRS = po intl' >Makefile.am
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'intl.*AM_GNU_GETTEXT' stderr
Index: tests/gnits.test
===================================================================
RCS file: /cvs/automake/automake/tests/gnits.test,v
retrieving revision 1.6
diff -u -r1.6 gnits.test
--- tests/gnits.test    8 Sep 2002 13:07:55 -0000       1.6
+++ tests/gnits.test    3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003  Free Software Foundation, 
Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,10 +22,12 @@
 
 . ./defs || exit 1
 
-cat > configure.in << 'END'
-PACKAGE=nonesuch
-VERSION=3.5.3.2
-AC_OUTPUT(Makefile)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [3.5.3.2])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES(Makefile)
 END
 
 cat > Makefile.am << 'END'
@@ -41,6 +43,6 @@
 : > ChangeLog
 : > THANKS
 
-$ACLOCAL || exit 1
-$AUTOMAKE --gnits && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails --gnits
+grep 'configure.in:.*3\.5\.3\.2' stderr
Index: tests/gnuwarn.test
===================================================================
RCS file: /cvs/automake/automake/tests/gnuwarn.test,v
retrieving revision 1.3
diff -u -r1.3 gnuwarn.test
--- tests/gnuwarn.test  22 Sep 2002 14:35:19 -0000      1.3
+++ tests/gnuwarn.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -46,8 +46,7 @@
 # Don't warn in foreign mode
 $AUTOMAKE -Wnone --add-missing --foreign
 # Warn in gnu mode
-$AUTOMAKE -Wnone  --add-missing --gnu 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -Wnone --add-missing --gnu
 grep 'Makefile.am:1:.*CFLAGS' stderr
 grep 'Makefile.am:2:.*LDFLAGS' stderr
 # No reason to warn about CXXFLAGS since it's not used.
Index: tests/gnuwarn2.test
===================================================================
RCS file: /cvs/automake/automake/tests/gnuwarn2.test,v
retrieving revision 1.1
diff -u -r1.1 gnuwarn2.test
--- tests/gnuwarn2.test 5 Jun 2003 20:33:05 -0000       1.1
+++ tests/gnuwarn2.test 3 Jul 2003 07:56:22 -0000
@@ -44,6 +44,5 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'configure.in:2:.*no-installman' stderr
Index: tests/insh.test
===================================================================
RCS file: /cvs/automake/automake/tests/insh.test,v
retrieving revision 1.4
diff -u -r1.4 insh.test
--- tests/insh.test     8 Sep 2002 13:07:55 -0000       1.4
+++ tests/insh.test     3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -23,11 +23,12 @@
 
 . ./defs || exit 1
 
+set -e
+
 rm -f mkinstalldirs
 
 : > Makefile.am
 
-$ACLOCAL || exit 1
-$AUTOMAKE > out 2>&1 && exit 1
-
-grep mkinstalldirs out
+$ACLOCAL
+AUTOMAKE_fails
+grep 'required.*mkinstalldirs' stderr
Index: tests/lex2.test
===================================================================
RCS file: /cvs/automake/automake/tests/lex2.test,v
retrieving revision 1.9
diff -u -r1.9 lex2.test
--- tests/lex2.test     8 Sep 2002 13:07:55 -0000       1.9
+++ tests/lex2.test     3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003  Free Software Foundation, 
Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -36,6 +36,5 @@
 : > joe.l
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PROG_LEX stderr
Index: tests/libobj10.test
===================================================================
RCS file: /cvs/automake/automake/tests/libobj10.test,v
retrieving revision 1.9
diff -u -r1.9 libobj10.test
--- tests/libobj10.test 8 Sep 2002 13:07:55 -0000       1.9
+++ tests/libobj10.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +23,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
@@ -35,9 +37,10 @@
 libfoo_a_LIBADD = @LIBOBJS@
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*foo\.c' stderr
 
 echo 'BUILT_SOURCES = foo.c' >> Makefile.am
 
-$AUTOMAKE || exit 1
+$AUTOMAKE
Index: tests/libobj12.test
===================================================================
RCS file: /cvs/automake/automake/tests/libobj12.test,v
retrieving revision 1.4
diff -u -r1.4 libobj12.test
--- tests/libobj12.test 13 Jan 2003 19:17:53 -0000      1.4
+++ tests/libobj12.test 3 Jul 2003 07:56:22 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -57,8 +57,7 @@
 # This however should be diagnosed, since foo.c and bar.c are in 
@address@hidden
 echo 'libfoo_a_SOURCES += foo.c' >> Makefile.am
 echo 'p1_SOURCES += bar.c' >> Makefile.am
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 $FGREP foo.c stderr
 $FGREP bar.c stderr
 
@@ -70,6 +69,5 @@
 $AUTOMAKE
 grep 'a_DEPENDENCIES.*LIBOBJS' Makefile.in
 echo 'a_SOURCES = foo.c' >> Makefile.am
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 $FGREP foo.c stderr
Index: tests/libobj13.test
===================================================================
RCS file: /cvs/automake/automake/tests/libobj13.test,v
retrieving revision 1.1
diff -u -r1.1 libobj13.test
--- tests/libobj13.test 13 Jan 2003 19:17:53 -0000      1.1
+++ tests/libobj13.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -50,6 +50,5 @@
 
 # This however should be diagnosed, since foo.c is in @address@hidden
 echo 'libfoo_la_SOURCES += foo.c' >> Makefile.am
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 $FGREP foo.c stderr
Index: tests/libobj3.test
===================================================================
RCS file: /cvs/automake/automake/tests/libobj3.test,v
retrieving revision 1.5
diff -u -r1.5 libobj3.test
--- tests/libobj3.test  23 Jun 2003 21:39:54 -0000      1.5
+++ tests/libobj3.test  3 Jul 2003 07:56:22 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -35,6 +35,5 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'Makefile.am:3:.*LIBOBJS' stderr
Index: tests/library2.test
===================================================================
RCS file: /cvs/automake/automake/tests/library2.test,v
retrieving revision 1.2
diff -u -r1.2 library2.test
--- tests/library2.test 8 Sep 2002 13:07:55 -0000       1.2
+++ tests/library2.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -29,6 +29,5 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AC_PROG_RANLIB stderr
Index: tests/library3.test
===================================================================
RCS file: /cvs/automake/automake/tests/library3.test,v
retrieving revision 1.2
diff -u -r1.2 library3.test
--- tests/library3.test 20 Nov 2002 22:03:57 -0000      1.2
+++ tests/library3.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -52,8 +52,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep '^Makefile.am:.*:   !A and !C and !D$' stderr
 # Is there only one missing condition?
 test `grep ':  ' stderr | wc -l` = 1 || exit 1
Index: tests/libtool4.test
===================================================================
RCS file: /cvs/automake/automake/tests/libtool4.test,v
retrieving revision 1.2
diff -u -r1.2 libtool4.test
--- tests/libtool4.test 8 Sep 2002 13:07:55 -0000       1.2
+++ tests/libtool4.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -29,6 +29,5 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AC_PROG_LIBTOOL stderr
Index: tests/libtool6.test
===================================================================
RCS file: /cvs/automake/automake/tests/libtool6.test,v
retrieving revision 1.2
diff -u -r1.2 libtool6.test
--- tests/libtool6.test 29 Sep 2002 13:08:18 -0000      1.2
+++ tests/libtool6.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -45,8 +45,7 @@
 
 libtoolize
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'liba\.la.* installed .*lib' stderr
 grep 'Makefile.am:5:' stderr
 grep 'Makefile.am:2:' stderr
Index: tests/lisp2.test
===================================================================
RCS file: /cvs/automake/automake/tests/lisp2.test,v
retrieving revision 1.2
diff -u -r1.2 lisp2.test
--- tests/lisp2.test    8 Sep 2002 13:07:55 -0000       1.2
+++ tests/lisp2.test    3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -31,8 +31,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PATH_LISPDIR stderr
 
 
@@ -45,8 +44,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PATH_LISPDIR stderr
 
 echo 3
@@ -58,8 +56,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PATH_LISPDIR stderr
 
 
Index: tests/location.test
===================================================================
RCS file: /cvs/automake/automake/tests/location.test,v
retrieving revision 1.4
diff -u -r1.4 location.test
--- tests/location.test 14 Apr 2003 19:13:15 -0000      1.4
+++ tests/location.test 3 Jul 2003 07:56:22 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -49,8 +49,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 
 # Smash the useless difference of lib file locations.
 sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
Index: tests/nogzip2.test
===================================================================
RCS file: /cvs/automake/automake/tests/nogzip2.test,v
retrieving revision 1.1
diff -u -r1.1 nogzip2.test
--- tests/nogzip2.test  15 Jun 2003 17:43:20 -0000      1.1
+++ tests/nogzip2.test  3 Jul 2003 07:56:22 -0000
@@ -34,8 +34,7 @@
 : > Makefile.am
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'configure.in:2:.*no-dist-gzip' stderr
 
 echo 'AUTOMAKE_OPTIONS = dist-bzip2' > Makefile.am
Index: tests/output5.test
===================================================================
RCS file: /cvs/automake/automake/tests/output5.test,v
retrieving revision 1.7
diff -u -r1.7 output5.test
--- tests/output5.test  8 Sep 2002 13:07:55 -0000       1.7
+++ tests/output5.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -33,6 +33,5 @@
 : > Makefile.am
 
 $ACLOCAL
-$AUTOMAKE > output 2>&1 && exit 1
-cat output
-grep 'found or specified' output
+AUTOMAKE_fails
+grep 'found or specified' stderr
Index: tests/overrid.test
===================================================================
RCS file: /cvs/automake/automake/tests/overrid.test,v
retrieving revision 1.2
diff -u -r1.2 overrid.test
--- tests/overrid.test  1 Jul 2003 21:25:39 -0000       1.2
+++ tests/overrid.test  3 Jul 2003 07:56:22 -0000
@@ -45,8 +45,7 @@
 
 $ACLOCAL
 $AUTOMAKE -Wno-override
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep install-local stderr && exit 1 # There is no such thing as install-local
 grep installcheck-local stderr
 grep html-local stderr
Index: tests/percent.test
===================================================================
RCS file: /cvs/automake/automake/tests/percent.test,v
retrieving revision 1.2
diff -u -r1.2 percent.test
--- tests/percent.test  8 Sep 2002 13:07:55 -0000       1.2
+++ tests/percent.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -38,5 +38,5 @@
 EOF
 
 $ACLOCAL
-$AUTOMAKE -Wportability && exit 1
-exit 0
+AUTOMAKE_fails -Wportability
+grep 'Makefile.am:4:.*%' stderr
Index: tests/percent2.test
===================================================================
RCS file: /cvs/automake/automake/tests/percent2.test,v
retrieving revision 1.1
diff -u -r1.1 percent2.test
--- tests/percent2.test 19 Sep 2002 08:59:49 -0000      1.1
+++ tests/percent2.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -38,8 +38,7 @@
 EOF
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep '%.*pattern.*rules' stderr
 
 # No error otherwise.
Index: tests/pluseq5.test
===================================================================
RCS file: /cvs/automake/automake/tests/pluseq5.test,v
retrieving revision 1.7
diff -u -r1.7 pluseq5.test
--- tests/pluseq5.test  20 Nov 2002 22:03:57 -0000      1.7
+++ tests/pluseq5.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo 'AM_CONDITIONAL(CHECK, true)' >> configure.in
 
 cat > Makefile.am << 'END'
@@ -31,10 +33,8 @@
 INCLUDES += def
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE 2>stderr && exit 1
-
-cat stderr # for debugging
+$ACLOCAL
+AUTOMAKE_fails
 
 # We expect the following diagnostic:
 #
@@ -45,19 +45,18 @@
 # Makefile.am:4: `+=' in the same conditions as the definitions.
 
 # Is !CHECK mentioned?
-grep ':.*!CHECK$' stderr || exit 1
+grep ':.*!CHECK$' stderr
 # Is there only one missing condition?
-test `grep ':  ' stderr | wc -l` = 1 || exit 1
+test `grep ':  ' stderr | wc -l` = 1
 
 # By the way, Automake should suggest using AM_CPPFLAGS,
 # because INCLUDES is an obsolete name.
-grep AM_CPPFLAGS stderr || exit 1
+grep AM_CPPFLAGS stderr
 
 # A way to suppress the obsolete warning is to use
 # -Wno-obsolete:
 echo 'AUTOMAKE_OPTIONS = -Wno-obsolete' >> Makefile.am
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_CPPFLAGS stderr && exit 1
 # !CHECK should still be mentioned.
-grep ':.*!CHECK$' stderr || exit 1
+grep ':.*!CHECK$' stderr
Index: tests/pluseq7.test
===================================================================
RCS file: /cvs/automake/automake/tests/pluseq7.test,v
retrieving revision 1.3
diff -u -r1.3 pluseq7.test
--- tests/pluseq7.test  8 Sep 2002 13:07:55 -0000       1.3
+++ tests/pluseq7.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
@@ -36,6 +38,6 @@
 
 : > q.c
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:3:.*AR' stderr
Index: tests/pluseq9.test
===================================================================
RCS file: /cvs/automake/automake/tests/pluseq9.test,v
retrieving revision 1.5
diff -u -r1.5 pluseq9.test
--- tests/pluseq9.test  20 Nov 2002 22:03:57 -0000      1.5
+++ tests/pluseq9.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >>configure.in <<EOF
 AM_CONDITIONAL(COND1, true)
 AM_CONDITIONAL(COND2, true)
@@ -52,10 +54,8 @@
 B += dd
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE 2>stderr && exit 1
-
-cat stderr # for debugging
+$ACLOCAL
+AUTOMAKE_fails
 
 # We expect the following diagnostic:
 #
@@ -69,8 +69,6 @@
 # COND1_FALSE (merging the last two conditions), so we'll support
 # this case in the check too.
 
-grep ':   !COND1 and !COND3$' stderr || exit 1
+grep ':   !COND1 and !COND3$' stderr
 # Make sure there is exactly one missing condition.
-test `grep ':  ' stderr | wc -l` = 1 || exit 1
-
-:
+test `grep ':  ' stderr | wc -l` = 1
Index: tests/pr211.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr211.test,v
retrieving revision 1.3
diff -u -r1.3 pr211.test
--- tests/pr211.test    8 Sep 2002 13:07:55 -0000       1.3
+++ tests/pr211.test    3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +23,8 @@
 required=libtoolize
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(Makefile.am)
 AM_INIT_AUTOMAKE(hello,0.23)
@@ -38,7 +40,7 @@
 libfoo_la_SOURCES = foo.c
 END
 
-libtoolize || exit 1
-$ACLOCAL || exit 1
-$AUTOMAKE -a && exit 1
-exit 0
+libtoolize
+$ACLOCAL
+AUTOMAKE_fails -a
+$FGREP 'foo.$(OBJEXT)' stderr
Index: tests/primary.test
===================================================================
RCS file: /cvs/automake/automake/tests/primary.test,v
retrieving revision 1.3
diff -u -r1.3 primary.test
--- tests/primary.test  8 Sep 2002 13:07:55 -0000       1.3
+++ tests/primary.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,10 +22,12 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = @programs@
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'EXTRA_PROGRAMS' stderr
Index: tests/primary2.test
===================================================================
RCS file: /cvs/automake/automake/tests/primary2.test,v
retrieving revision 1.4
diff -u -r1.4 primary2.test
--- tests/primary2.test 8 Sep 2002 13:07:55 -0000       1.4
+++ tests/primary2.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo AC_PROG_CC >> configure.in
 
 cat > Makefile.am << 'END'
@@ -29,6 +31,6 @@
 EXTRA_PROGRAMS = joe @more@
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep EXTRA_PROGRAMS stderr
Index: tests/python2.test
===================================================================
RCS file: /cvs/automake/automake/tests/python2.test,v
retrieving revision 1.2
diff -u -r1.2 python2.test
--- tests/python2.test  8 Sep 2002 13:07:55 -0000       1.2
+++ tests/python2.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -33,8 +33,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 echo 2
@@ -46,8 +45,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
@@ -60,8 +58,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
@@ -74,8 +71,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
@@ -88,8 +84,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
Index: tests/recurs.test
===================================================================
RCS file: /cvs/automake/automake/tests/recurs.test,v
retrieving revision 1.4
diff -u -r1.4 recurs.test
--- tests/recurs.test   8 Sep 2002 13:07:55 -0000       1.4
+++ tests/recurs.test   3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -36,6 +38,6 @@
 foo = $(bin_PROGRAMS)
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:.*bin_PROGRAMS.*recursively defined' stderr
Index: tests/reqd2.test
===================================================================
RCS file: /cvs/automake/automake/tests/reqd2.test,v
retrieving revision 1.1
diff -u -r1.1 reqd2.test
--- tests/reqd2.test    13 Jan 2003 19:17:53 -0000      1.1
+++ tests/reqd2.test    3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -52,8 +52,7 @@
 
 test -f autoconf/ltmain.sh # Sanity check.
 rm -f autoconf/ltmain.sh
-$AUTOMAKE --add-missing --copy 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing --copy
 grep 'autoconf/ltmain.sh' stderr
 grep 'running more than two' stderr && exit 1
 
Index: tests/seenc.test
===================================================================
RCS file: /cvs/automake/automake/tests/seenc.test,v
retrieving revision 1.7
diff -u -r1.7 seenc.test
--- tests/seenc.test    8 Sep 2002 13:07:56 -0000       1.7
+++ tests/seenc.test    3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997, 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -40,7 +40,6 @@
 : > mountlist.c
 
 $ACLOCAL
-$AUTOMAKE 2>err && exit 1
-cat err
-$FGREP CC err
-$FGREP CXX err
+AUTOMAKE_fails
+$FGREP CC stderr
+$FGREP CXX stderr
Index: tests/specflg.test
===================================================================
RCS file: /cvs/automake/automake/tests/specflg.test,v
retrieving revision 1.1
diff -u -r1.1 specflg.test
--- tests/specflg.test  13 Jan 2003 19:17:53 -0000      1.1
+++ tests/specflg.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -34,12 +36,13 @@
 END
 
 # Make sure `compile' is required.
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
+$ACLOCAL
+AUTOMAKE_fails
+grep 'required.*compile' stderr
 
 : > compile
 
-$AUTOMAKE || exit 1
+$AUTOMAKE
 
 # Look for $(COMPILE) -c in .c.o rule.
 grep 'COMPILE. [^-]' Makefile.in && exit 1
Index: tests/specflg2.test
===================================================================
RCS file: /cvs/automake/automake/tests/specflg2.test,v
retrieving revision 1.1
diff -u -r1.1 specflg2.test
--- tests/specflg2.test 13 Jan 2003 19:17:53 -0000      1.1
+++ tests/specflg2.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CXX
@@ -37,22 +39,23 @@
 END
 
 # Make sure `compile' is required.
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
+$ACLOCAL
+AUTOMAKE_fails
+grep 'required.*compile' stderr
 
 : > compile
 
-$AUTOMAKE || exit 1
+$AUTOMAKE
 
 # Look for $(COMPILE) -c in .c.o rule.
 grep 'COMPILE. [^-]' Makefile.in && exit 1
 
 # Look for libfoo_a-foo.o.
-grep foo Makefile.in || exit 1
+grep foo Makefile.in
 grep '[^-]foo\.o' Makefile.in && exit 1
 
 # Look for libfoo_a-bar.o.
-grep bar Makefile.in || exit 1
+grep bar Makefile.in
 grep '[^-]bar\.o' Makefile.in && exit 1
 
 exit 0
Index: tests/spell.test
===================================================================
RCS file: /cvs/automake/automake/tests/spell.test,v
retrieving revision 1.3
diff -u -r1.3 spell.test
--- tests/spell.test    8 Sep 2002 13:07:56 -0000       1.3
+++ tests/spell.test    3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,12 +22,14 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz foo
 zardoz_SOURCES = x.c
 boo_SOURCES = y.c
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:3:.*boo' stderr
Index: tests/spell2.test
===================================================================
RCS file: /cvs/automake/automake/tests/spell2.test,v
retrieving revision 1.4
diff -u -r1.4 spell2.test
--- tests/spell2.test   8 Sep 2002 13:07:56 -0000       1.4
+++ tests/spell2.test   3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo AC_PROG_CC >> configure.in
 
 cat > Makefile.am << 'END'
@@ -30,6 +32,6 @@
 qardoz_LDADD = -ljoe
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:3:.*qardoz' stderr
Index: tests/srcsub.test
===================================================================
RCS file: /cvs/automake/automake/tests/srcsub.test,v
retrieving revision 1.1
diff -u -r1.1 srcsub.test
--- tests/srcsub.test   13 Jan 2003 19:17:53 -0000      1.1
+++ tests/srcsub.test   3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -32,6 +34,6 @@
 EXTRA_x_SOURCES = y.c
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*x_SOURCES.*substitution' stderr
Index: tests/srcsub2.test
===================================================================
RCS file: /cvs/automake/automake/tests/srcsub2.test,v
retrieving revision 1.1
diff -u -r1.1 srcsub2.test
--- tests/srcsub2.test  13 Jan 2003 19:17:53 -0000      1.1
+++ tests/srcsub2.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -34,6 +36,7 @@
 EXTRA_x_SOURCES = y.c
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*bar.*substitution' stderr
+grep 'Makefile.am:2:.*x_SOURCES' stderr
Index: tests/stdlib.test
===================================================================
RCS file: /cvs/automake/automake/tests/stdlib.test,v
retrieving revision 1.4
diff -u -r1.4 stdlib.test
--- tests/stdlib.test   29 Sep 2002 12:49:07 -0000      1.4
+++ tests/stdlib.test   3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -34,7 +34,6 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2> output.log && exit 1
-cat output.log
+AUTOMAKE_fails
 # We're specifically testing for line-number information.
-grep 'Makefile.am:1:.*foo.*standard library name' output.log
+grep 'Makefile.am:1:.*foo.*standard library name' stderr
Index: tests/subdir7.test
===================================================================
RCS file: /cvs/automake/automake/tests/subdir7.test,v
retrieving revision 1.2
diff -u -r1.2 subdir7.test
--- tests/subdir7.test  8 Sep 2002 13:07:56 -0000       1.2
+++ tests/subdir7.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -36,8 +36,7 @@
 
 $ACLOCAL
 
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'obj.*BSD' stderr
 
 cat >Makefile.am <<EOF
@@ -45,6 +44,5 @@
 DIST_SUBDIRS = obj
 EOF
 
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'obj.*BSD' stderr
Index: tests/substtarg.test
===================================================================
RCS file: /cvs/automake/automake/tests/substtarg.test,v
retrieving revision 1.3
diff -u -r1.3 substtarg.test
--- tests/substtarg.test        14 Apr 2003 19:13:15 -0000      1.3
+++ tests/substtarg.test        3 Jul 2003 07:56:22 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +23,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(fakelib.c)
 AM_INIT_AUTOMAKE(fakelib,0.0)
@@ -44,11 +46,8 @@
        @echo here we do some custom stuff, instead of invoking the linker
 END
 
-set -e
-
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'address@hidden@.a' stderr
 num=`grep 'address@hidden@.a:' Makefile.in | wc -l`
 test $num -eq 1
Index: tests/suffix11.test
===================================================================
RCS file: /cvs/automake/automake/tests/suffix11.test,v
retrieving revision 1.2
diff -u -r1.2 suffix11.test
--- tests/suffix11.test 10 Jan 2003 18:15:21 -0000      1.2
+++ tests/suffix11.test 3 Jul 2003 07:56:22 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -50,8 +50,7 @@
 $ACLOCAL
 $AUTOCONF
 # What we do is not portable.  Automake should warn.
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep 'Inference rules can have only one target before the colon' stderr
 # But this should work anyway.
 $AUTOMAKE -a -Wno-portability
Index: tests/symlink.test
===================================================================
RCS file: /cvs/automake/automake/tests/symlink.test,v
retrieving revision 1.5
diff -u -r1.5 symlink.test
--- tests/symlink.test  8 Sep 2002 13:07:56 -0000       1.5
+++ tests/symlink.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +23,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 rm -f install-sh
 rm -f mkinstalldirs
 
@@ -32,6 +34,6 @@
 AC_CONFIG_AUX_DIR(sub)
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE --add-missing && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails --add-missing
+grep 'error while making link' stderr
Index: tests/syntax.test
===================================================================
RCS file: /cvs/automake/automake/tests/syntax.test,v
retrieving revision 1.3
diff -u -r1.3 syntax.test
--- tests/syntax.test   8 Sep 2002 13:07:56 -0000       1.3
+++ tests/syntax.test   3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,12 +22,14 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 foo = q \
 
 lib_LTLIBRARIES = foo.la
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*blank line' stderr
Index: tests/targetclash.test
===================================================================
RCS file: /cvs/automake/automake/tests/targetclash.test,v
retrieving revision 1.1
diff -u -r1.1 targetclash.test
--- tests/targetclash.test      13 Sep 2002 16:37:01 -0000      1.1
+++ tests/targetclash.test      3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -35,6 +35,5 @@
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep 'redefinition.*ctags' stderr
Index: tests/txinfo4.test
===================================================================
RCS file: /cvs/automake/automake/tests/txinfo4.test,v
retrieving revision 1.1
diff -u -r1.1 txinfo4.test
--- tests/txinfo4.test  13 Jan 2003 19:17:54 -0000      1.1
+++ tests/txinfo4.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
 END
@@ -29,6 +31,6 @@
 echo '@setfilename textutils.frob' > textutils.texi
 : > texinfo.tex
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'textutils.texi:1:.*textutils.frob.*extension' stderr
Index: tests/version3.test
===================================================================
RCS file: /cvs/automake/automake/tests/version3.test,v
retrieving revision 1.4
diff -u -r1.4 version3.test
--- tests/version3.test 8 Sep 2002 13:07:56 -0000       1.4
+++ tests/version3.test 3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,10 +22,12 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = 9.9x
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:1:.*Automake 9.9x' stderr
Index: tests/warnopts.test
===================================================================
RCS file: /cvs/automake/automake/tests/warnopts.test,v
retrieving revision 1.5
diff -u -r1.5 warnopts.test
--- tests/warnopts.test 10 Jan 2003 19:30:18 -0000      1.5
+++ tests/warnopts.test 3 Jul 2003 07:56:22 -0000
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -24,7 +24,6 @@
 
 set -e
 
-
 cat >>configure.in <<END
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
@@ -49,8 +48,7 @@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 # The expected diagnostic is
 #   Makefile.am:3: unused variable: `foo_SOURCES'
 #   sub/Makefile.am:2: `INCLUDES' is the old name for `AM_CPPFLAGS'
Index: tests/xsource.test
===================================================================
RCS file: /cvs/automake/automake/tests/xsource.test,v
retrieving revision 1.5
diff -u -r1.5 xsource.test
--- tests/xsource.test  8 Sep 2002 13:07:56 -0000       1.5
+++ tests/xsource.test  3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1997, 1998, 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003
+#   Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +15,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +24,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz
 zardoz_SOURCES = z.c x/z.c
@@ -38,5 +41,5 @@
 : > x/z.c
 
 $ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+AUTOMAKE_fails
+$FGREP 'z.$(OBJEXT)' stderr
Index: tests/yacc2.test
===================================================================
RCS file: /cvs/automake/automake/tests/yacc2.test,v
retrieving revision 1.5
diff -u -r1.5 yacc2.test
--- tests/yacc2.test    8 Sep 2002 13:07:56 -0000       1.5
+++ tests/yacc2.test    3 Jul 2003 07:56:22 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +23,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_YACC
@@ -39,8 +41,8 @@
 
 
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # If zardoz.h IS mentioned, fail
 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
@@ -50,17 +52,17 @@
 cp Makefile.src Makefile.am
 echo 'AM_YFLAGS = -d' >> Makefile.am
 
-$AUTOMAKE || exit 1
+$AUTOMAKE
 
 # If zardoz.h is NOT mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null || exit 1
+grep 'zardoz.h' Makefile.in > /dev/null
 
 
 
 cp Makefile.src Makefile.am
 echo 'AM_YFLAGS = ' >> Makefile.am
 
-$AUTOMAKE || exit 1
+$AUTOMAKE
 
 # If zardoz.h IS mentioned, fail
 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
@@ -71,22 +73,21 @@
 echo 'YFLAGS = -d' >> Makefile.am
 
 # YFLAGS is a use variable.
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
-grep 'YFLAGS' stderr || exit 1
-$AUTOMAKE -Wno-gnu || exit 1
+AUTOMAKE_fails
+grep 'YFLAGS' stderr
+$AUTOMAKE -Wno-gnu
 
 # If zardoz.h is NOT mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null || exit 1
+grep 'zardoz.h' Makefile.in > /dev/null
 
 
 
 cp Makefile.src Makefile.am
 echo 'YFLAGS = ' >> Makefile.am
 
-$AUTOMAKE -Wno-gnu || exit 1
+$AUTOMAKE -Wno-gnu
 
 # If zardoz.h IS mentioned, fail
 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
 
-exit 0
+:

-- 
Alexandre Duret-Lutz





reply via email to

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