automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11.1-113-g04845e0
Date: Sat, 12 Jun 2010 11:24:30 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=04845e016e9f2c5fa337739b455b3691afe73b41

The branch, branch-1.11 has been updated
       via  04845e016e9f2c5fa337739b455b3691afe73b41 (commit)
       via  f2d7321b758061ff25c2de8616e4f320ea098462 (commit)
       via  c1f6cdbdb3ef89d2f6a23e5b9d87baeba73b2735 (commit)
       via  12e9334a5eac926a69e30979118954ec3eee1781 (commit)
      from  e298e3bbc55ea2f96d2b3ddc81c3e40ea97977fb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 04845e016e9f2c5fa337739b455b3691afe73b41
Merge: e298e3bbc55ea2f96d2b3ddc81c3e40ea97977fb 
f2d7321b758061ff25c2de8616e4f320ea098462
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Jun 12 13:01:37 2010 +0200

    Merge branch 'maint' into branch-1.11

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

Summary of changes:
 ChangeLog               |   56 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/README            |    7 ++++++
 tests/acloca18.test     |   12 ++++++---
 tests/acoutpt2.test     |   20 ++++++++++------
 tests/ansi.test         |   29 ++++++++++++++++++------
 tests/ansi3.test        |   13 +++++------
 tests/ansi3b.test       |    7 +++--
 tests/backsl.test       |    8 ++++--
 tests/backsl2.test      |   11 ++++++---
 tests/block.test        |    8 ++++--
 tests/canon2.test       |   12 ++++++---
 tests/canon3.test       |   10 +++++---
 tests/canon4.test       |    8 ++++--
 tests/comment2.test     |    8 ++++--
 tests/cond14.test       |   12 ++++++---
 tests/cond15.test       |   22 +++++++++++-------
 tests/cond39.test       |   12 ++++++----
 tests/cond4.test        |   48 +++++++++++++++++++++-------------------
 tests/cond7.test        |   18 +++++++-------
 tests/condinc.test      |   15 ++++++------
 tests/condlib.test      |    8 ++++--
 tests/configure.test    |    2 +-
 tests/missing3.test     |    2 +-
 tests/missing4.test     |   12 +++++-----
 tests/missing6.test     |    6 ++--
 tests/output-order.test |    4 +-
 tests/pr300-ltlib.test  |    5 ++-
 tests/python6.test      |    8 ++++--
 tests/python7.test      |    8 ++++--
 tests/python8.test      |    8 ++++--
 tests/python9.test      |    8 ++++--
 tests/subobj.test       |    9 +++++--
 tests/vars3.test        |    7 +++--
 33 files changed, 277 insertions(+), 146 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c537294..8a5acaa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,59 @@
+2010-06-12  Stefano Lattarini  <address@hidden>
+
+       Testsuite: ensure verbose printing of captured stderr.
+       * tests/acloca18.test: Print captured stderr before either failing
+       or grepping it.  Be sure to send captured stderr to stderr, not to
+       stdout.
+       * tests/ansi3b.test: Likewise.
+       * tests/cond39.test: Likewise.
+       * tests/configure.test: Likewise.
+       * tests/missing3.test: Likewise.
+       * tests/missing6.test: Likewise.
+       * tests/output-order.test: Likewise.
+       * tests/pr300-ltlib.test: Likewise.
+       * tests/python6.test: Likewise.
+       * tests/python7.test: Likewise.
+       * tests/python8.test: Likewise.
+       * tests/python9.test: Likewise.
+       * tests/subobj.test: Likewise.
+       * tests/vars3.test: Likewise.
+       * tests/missing4.test: Likewise, and fix a call to grep not to use
+       the `-c' flag.
+       * tests/ansi3.test: Likewise, and rely on the `configure.in' stub
+       created by `./defs', rather than writing one from scratch.
+
+       Enable `errexit' shell flag in various tests.
+       * tests/backsl.test: Enable the `errexit' shell flag, and
+       related changes.
+       * tests/backsl2.test: Likewise.
+       * tests/block.test: Likewise.
+       * tests/canon2.test: Likewise.
+       * tests/canon4.test: Likewise.
+       * tests/comment2.test: Likewise.
+       * tests/condlib.test: Likewise.
+       * tests/cond15.test: Likewise, and prefer $FGREP over grep.
+       * tests/canon3.test: Likewise.  Also, avoid to create an useless
+       dummy source file.
+       * tests/acoutpt2.test: Enable the `errexit' shell flag, and some
+       related changes.  Do some cosmetic improvements in the generated
+       `configure.in' file.
+       * tests/cond4.test: Likewise.
+       * tests/cond14.test: Likewise.
+       * tests/condinc.test: Likewise.
+       * tests/cond7.test: Likewise.  Also, remove useless setting of
+       AUTOMAKE_OPTIONS to `foreign' in the generated Makefile.am.
+       * tests/ansi.test: Enable the `errexit' shell flag, and related
+       changes.  Extended, esp. by running autoconf, ./configure and
+       make, and by looking into the distdir.
+
+2010-06-12  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Extend tests/README w.r.t. trailing `:' in test scripts.
+       * tests/README (section "Writing test cases" subsection "Do"):
+       Explain why apparently redundant trailing `:' and `Exit 0' in
+       test scripts can indeed be useful.
+
 2010-06-11  Stefano Lattarini  <address@hidden>
 
        Improve determination of PATH separator in bootstrap script.
diff --git a/tests/README b/tests/README
index 095d176..7d74083 100644
--- a/tests/README
+++ b/tests/README
@@ -111,6 +111,13 @@ Do
 
   Use `set -e' to catch failures you might not have thought of.
 
+  End the test script with a `:' or `Exit 0'.  Otherwise, when somebody
+  changes the test by adding a failing command after the last command,
+  the test will spuriously fail because $? is nonzero at the end.
+  Note that this is relevant also for tests using `set -e', if they
+  contain commands like "grep ... Makefile.in && Exit 1" (and there
+  are indeed a lot of such tests).
+
   Use $ACLOCAL, $AUTOMAKE, $AUTOCONF, $AUTOUPDATE, $AUTOHEADER,
   $PERL, $MAKE, $EGREP, and $FGREP, instead of the corresponding
   commands.
diff --git a/tests/acloca18.test b/tests/acloca18.test
index 276e5ba..c38fac4 100755
--- a/tests/acloca18.test
+++ b/tests/acloca18.test
@@ -106,9 +106,13 @@ AC_DEFUN([AM_MACRO1], [echo macro1d >> foo])
 AC_DEFUN([AM_MACRO2], [echo macro2d >> foo])
 EOF
 rm -f foo
-$ACLOCAL --diff=diff >output 2>stderr
-cat stderr
-cat output
-grep '#serial 456' output
+$ACLOCAL --diff=diff >stdout 2>stderr || {
+  cat stderr >&2
+  cat stdout
+  Exit 1
+}
+cat stderr >&2
+cat stdout
+grep '#serial 456' stdout
 test ! -f 4/m1.m4
 grep 'installing.*4/m1.m4' stderr
diff --git a/tests/acoutpt2.test b/tests/acoutpt2.test
index fb8fbcf..2d0743c 100755
--- a/tests/acoutpt2.test
+++ b/tests/acoutpt2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,9 +18,11 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_OUTPUT([subdir/Makefile subdir/foo Makefile foo], [true])
 END
 
@@ -31,12 +33,14 @@ mkdir subdir
 : > foo.in
 : > subdir/foo.in
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 count=`$FGREP foo.in Makefile.in | wc -l`
-test $count -eq 2 || Exit 1
+test $count -eq 2
 
 # This ought to work as well.
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE --add-missing --force-missing
+
+:
diff --git a/tests/ansi.test b/tests/ansi.test
index cd9a07b..c0778c6 100755
--- a/tests/ansi.test
+++ b/tests/ansi.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2010 Free
+# Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,21 +20,36 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = ansi2knr
-magic:
-       @echo $(DISTFILES)
+.PHONY: test1 test2
+test1:
+       echo ' $(DISTFILES) ' | grep ' ansi2knr\.c '
+       echo ' $(DISTFILES) ' | grep ' ansi2knr\.1 '
+test2: distdir
+       test -f $(distdir)/ansi2knr.c
+       test -f $(distdir)/ansi2knr.1
 END
 
 cat >> configure.in << 'END'
 AM_C_PROTOTYPES
+AC_OUTPUT
 END
 
 : > ansi2knr.c
 : > ansi2knr.1
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 $FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
-$MAKE -s -f Makefile.sed SHELL=$SHELL magic | grep 'ansi2knr\.c'
+$MAKE -f Makefile.sed SHELL=$SHELL test1
+
+$AUTOCONF
+./configure
+$MAKE test1
+$MAKE test2
+
+:
diff --git a/tests/ansi3.test b/tests/ansi3.test
index 2bbcaf7..e1e0c42 100755
--- a/tests/ansi3.test
+++ b/tests/ansi3.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2003, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,12 +23,10 @@ required=gcc
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(hello.c)
-AM_INIT_AUTOMAKE(hello,0.23)
+cat >> configure.in << 'END'
 AC_PROG_CC
 AM_C_PROTOTYPES
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -53,8 +52,8 @@ export CFLAGS
 # Linux boxes (Red Hat 5.1 in particular).
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a 2>stderr
-cat stderr
+$AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'Makefile.am:1:.*ansi2knr\.c' stderr
 CC='gcc' ./configure
 ANSI2KNR=./ansi2knr U=_ $MAKE -e
diff --git a/tests/ansi3b.test b/tests/ansi3b.test
index 8f254ad..ad222ff 100755
--- a/tests/ansi3b.test
+++ b/tests/ansi3b.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2003, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,8 +53,8 @@ export CFLAGS
 # Linux boxes (Red Hat 5.1 in particular).
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a 2>stderr
-cat stderr
+$AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'configure.in:2:.*ansi2knr\.1' stderr
 CC='gcc' ./configure
 ANSI2KNR=./ansi2knr U=_ $MAKE -e
diff --git a/tests/backsl.test b/tests/backsl.test
index e5d2b39..3947cde 100755
--- a/tests/backsl.test
+++ b/tests/backsl.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -27,8 +29,8 @@ bin_PROGRAMS = \
    frob
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^_SOURCE' Makefile.in && Exit 1
 Exit 0
diff --git a/tests/backsl2.test b/tests/backsl2.test
index ba62db7..35e9b9b 100755
--- a/tests/backsl2.test
+++ b/tests/backsl2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,12 +20,14 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 SUBDIRS = \
    .
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
-Exit 0
+:
diff --git a/tests/block.test b/tests/block.test
index 8b4692a..862389e 100755
--- a/tests/block.test
+++ b/tests/block.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 #START
 #a
@@ -27,8 +29,8 @@ cat > Makefile.am << 'END'
 #END
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 (sed -e '/^#START/,/^#END/ !d' Makefile.in | grep -v '^#') && Exit 1
 Exit 0
diff --git a/tests/canon2.test b/tests/canon2.test
index e8acb81..ab28617 100755
--- a/tests/canon2.test
+++ b/tests/canon2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = zar-doz.texi
 zar_doz_TEXINFOS = frob.texi
@@ -27,8 +30,9 @@ END
 echo '@setfilename zar-doz.info' > zar-doz.texi
 echo '@setfilename frob' > frob.texi
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep zar-doz_TEXINFOS Makefile.in && Exit 1
-Exit 0
+
+:
diff --git a/tests/canon3.test b/tests/canon3.test
index da347eb..9d5a172 100755
--- a/tests/canon3.test
+++ b/tests/canon3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -28,8 +30,8 @@ END
 
 : > perm-number.c
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
-grep 'perm_number\.c' Makefile.in && Exit 1
+$FGREP 'perm_number.c' Makefile.in && Exit 1
 Exit 0
diff --git a/tests/canon4.test b/tests/canon4.test
index 607ba2e..52e968d 100755
--- a/tests/canon4.test
+++ b/tests/canon4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
@@ -28,8 +30,8 @@ noinst_LIBRARIES = libx-y.a
 libx_y_a_SOURCES = xy.c
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^libx-y.*=' Makefile.in && Exit 1
 Exit 0
diff --git a/tests/comment2.test b/tests/comment2.test
index 2073328..97e6a26 100755
--- a/tests/comment2.test
+++ b/tests/comment2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -27,8 +29,8 @@ cat > Makefile.am << 'END'
 bin_PROGRAMS = sim_products receive_th receive_pos # image_proc
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^image_proc' Makefile.in && Exit 1
 Exit 0
diff --git a/tests/cond14.test b/tests/cond14.test
index 2181325..2779a3d 100755
--- a/tests/cond14.test
+++ b/tests/cond14.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,9 +19,11 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(COND1, true)
+AM_CONDITIONAL([COND1], [true])
 END
 
 cat > Makefile.am << 'END'
@@ -43,8 +45,10 @@ endif
 bin_PROGRAMS = $(BUILD_helldl)
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 num=`grep 'helldl$(EXEEXT):' Makefile.in | wc -l`
 test $num -eq 2
+
+:
diff --git a/tests/cond15.test b/tests/cond15.test
index a371baa..0789074 100755
--- a/tests/cond15.test
+++ b/tests/cond15.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,10 +18,12 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(COND1, true)
-AM_CONDITIONAL(COND2, true)
+AM_CONDITIONAL([COND1], [true])
+AM_CONDITIONAL([COND2], [true])
 END
 
 cat > Makefile.am << 'END'
@@ -50,10 +52,12 @@ endif
 bin_PROGRAMS = helldl
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+num1=`$FGREP 'helldl$(EXEEXT):' Makefile.in | wc -l`
+num2=`$FGREP '@COND1_FALSE@@address@hidden(EXEEXT):' Makefile.in | wc -l`
+test $num1 -eq 4
+test $num2 -eq 1
 
-num1=`grep 'helldl$(EXEEXT):' Makefile.in | wc -l`
-num2=`grep '@COND1_FALSE@@address@hidden(EXEEXT):' Makefile.in | wc -l`
-test $num1 -eq 4 || Exit 1
-test $num2 -eq 1 || Exit 1
+:
diff --git a/tests/cond39.test b/tests/cond39.test
index 79eaa70..8d96595 100755
--- a/tests/cond39.test
+++ b/tests/cond39.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -82,8 +82,8 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 
 ./configure COND=true
-$MAKE 2>stderr
-cat stderr
+$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'overriding commands' stderr && Exit 1
 $MAKE sure-exist
 ./prog1 && Exit 1
@@ -97,8 +97,8 @@ $MAKE sure-exist
 $MAKE distclean
 
 ./configure COND=false
-$MAKE 2>stderr
-cat stderr
+$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'overriding commands' stderr && Exit 1
 ./prog1
 ./sub/prog2
@@ -107,3 +107,5 @@ $MAKE sure-not-exist
 $MAKE
 ./prog1
 ./sub/prog2
+
+:
diff --git a/tests/cond4.test b/tests/cond4.test
index cc569d6..6efc9ce 100755
--- a/tests/cond4.test
+++ b/tests/cond4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,13 +19,13 @@
 required='GNUmake gcc'
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(foo,0.0)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(ONE, test "x$CONDITION1" = "xtrue")
-AM_CONDITIONAL(TWO, test "x$CONDITION2" = "xtrue")
-AC_OUTPUT(Makefile)
+AM_CONDITIONAL([ONE], [test "x$CONDITION1" = "xtrue"])
+AM_CONDITIONAL([TWO], [test "x$CONDITION2" = "xtrue"])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -45,33 +45,35 @@ echo-objects:
        @echo $(targ_OBJECTS)
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # We should not output useless definitions.
-test "`grep 'address@hidden@' Makefile.in | wc -l`" -eq 0 || Exit 1
+test "`grep 'address@hidden@' Makefile.in | wc -l`" -eq 0
 
-$AUTOCONF || Exit 1
+$AUTOCONF
 
 # Ignore user CFLAGS.
 CFLAGS=
 export CFLAGS
 
-CONDITION1=true CONDITION2=true ./configure || Exit 1
+CONDITION1=true CONDITION2=true ./configure
 msgtt=`$MAKE --no-print-directory echo-objects`
-CONDITION1=true CONDITION2=false ./configure || Exit 1
+CONDITION1=true CONDITION2=false ./configure
 msgtf=`$MAKE --no-print-directory echo-objects`
-CONDITION1=false CONDITION2=true ./configure || Exit 1
+CONDITION1=false CONDITION2=true ./configure
 msgft=`$MAKE --no-print-directory echo-objects`
-CONDITION1=false CONDITION2=false ./configure || Exit 1
+CONDITION1=false CONDITION2=false ./configure
 msgff=`$MAKE --no-print-directory echo-objects`
 
-echo $msgtt
-echo $msgtf
-echo $msgft
-echo $msgff
+: msgtt = $msgtt
+: msgtf = $msgtf
+: msgft = $msgft
+: msgff = $msgff
+
+test x"$msgtt" = x"main.o one.o two.o"
+test x"$msgtf" = x"main.o one.o"
+test x"$msgft" = x"main.o two.o"
+test x"$msgff" = x"main.o"
 
-test "$msgtt" = "main.o one.o two.o" || Exit 1
-test "$msgtf" = "main.o one.o" || Exit 1
-test "$msgft" = "main.o two.o" || Exit 1
-test "$msgff" = "main.o" || Exit 1
+:
diff --git a/tests/cond7.test b/tests/cond7.test
index 4d611ba..b11dddf 100755
--- a/tests/cond7.test
+++ b/tests/cond7.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,16 +18,15 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT()
-AM_INIT_AUTOMAKE(test,0.1)
+set -e
+
+cat >> configure.in << 'END'
 compat=yes
-AM_CONDITIONAL(Compatible, test x$compat = xyes)
-AC_OUTPUT(Makefile)
+AM_CONDITIONAL([Compatible], [test x$compat = xyes])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS=foreign
 if Compatible
 abdir = none
 ab_HEADERS = \
@@ -35,7 +34,8 @@ ab_HEADERS = \
 endif
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
 grep '^[^#].*002' Makefile.in && Exit 1
 Exit 0
diff --git a/tests/condinc.test b/tests/condinc.test
index eddd3bc..cf9e35f 100755
--- a/tests/condinc.test
+++ b/tests/condinc.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,8 +18,10 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
-AM_CONDITIONAL(TOBE, false)
+AM_CONDITIONAL([TOBE], [false])
 END
 
 cat > Makefile.am << 'END'
@@ -33,11 +35,10 @@ target: dependency
        rule
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^target:' Makefile.in && Exit 1
+grep 'address@hidden@target:' Makefile.in
 
-grep 'address@hidden@target:' Makefile.in || Exit 1
-
-Exit 0
+:
diff --git a/tests/condlib.test b/tests/condlib.test
index 49cc9f1..b6c998d 100755
--- a/tests/condlib.test
+++ b/tests/condlib.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2008, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_RANLIB
 AM_MAINTAINER_MODE
@@ -34,8 +36,8 @@ nodist_librsaref_a_SOURCES = desc.c digit.c
 BUILT_SOURCES = $(nodist_librsaref_a_SOURCES)
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 $FGREP librsaref.a.c Makefile.in && Exit 1
 Exit 0
diff --git a/tests/configure.test b/tests/configure.test
index f7ee977..838da68 100755
--- a/tests/configure.test
+++ b/tests/configure.test
@@ -48,7 +48,7 @@ $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'configure.ac.*configure.in.*both present' stderr
 
-$ACLOCAL -Wno-error 2>stderr
+$ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'configure.ac.*configure.in.*both present' stderr
 grep 'proceeding.*configure.ac' stderr
diff --git a/tests/missing3.test b/tests/missing3.test
index d3a7823..54044f5 100755
--- a/tests/missing3.test
+++ b/tests/missing3.test
@@ -43,7 +43,7 @@ grep . stderr && Exit 1
 cat stderr >&2
 grep WARNING stderr
 
-./missing --run ./missing --version 2>stderr
+./missing --run ./missing --version 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep . stderr && Exit 1
 ./missing --run ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
diff --git a/tests/missing4.test b/tests/missing4.test
index 1015828..13a4c22 100755
--- a/tests/missing4.test
+++ b/tests/missing4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,13 +36,13 @@ cmp aclocal.m4 aclocal.tmp && Exit 1
 
 mv aclocal.tmp aclocal.m4
 
-$MAKE 2>stderr
-cat stderr
+$MAKE 2>stderr || { cat cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'You have another version of autoconf' stderr
-grep -c 'aclocal.m4:.*this file was generated for' stderr
+grep 'aclocal.m4:.*this file was generated for' stderr
 
-$MAKE 2>stderr
-cat stderr
+$MAKE 2>stderr || { cat cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'You have another version of autoconf' stderr && Exit 1
 grep 'aclocal.m4:.*this file was generated for' stderr && Exit 1
 
diff --git a/tests/missing6.test b/tests/missing6.test
index 914546b..3994b85 100755
--- a/tests/missing6.test
+++ b/tests/missing6.test
@@ -31,7 +31,7 @@ rm -f configure.in
 touch Makefile.am
 
 $ACLOCAL
-$AUTOCONF 2>stderr
+$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'You have another version of autoconf' stderr
 grep 'aclocal.m4:.*this file was generated for' stderr
@@ -44,8 +44,8 @@ cmp configure.ac configure.tmp && Exit 1
 
 mv configure.tmp configure.ac
 
-$MAKE 2>stderr
-cat stderr
+$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'You have another version of autoconf' stderr
 grep 'aclocal.m4:.*this file was generated for autoconf 9999a' stderr
 
diff --git a/tests/output-order.test b/tests/output-order.test
index 856baa2..cb9ffff 100755
--- a/tests/output-order.test
+++ b/tests/output-order.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@ END
 $ACLOCAL
 $AUTOCONF
 rm -f missing install-sh
-$AUTOMAKE --add-missing --copy 2>stderr
+$AUTOMAKE --add-missing --copy 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
 
 for i in 1 2 3 4 5 6; do
diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test
index 01814a9..c6f9a5e 100755
--- a/tests/pr300-ltlib.test
+++ b/tests/pr300-ltlib.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007, 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2008, 2009, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -58,7 +59,7 @@ grep 'libb.la .*-rpath .*lib/subdir' stdout
 test -f subdir/liba.la
 test -f subdir/libb.la
 
-$MAKE install 2>stderr
+$MAKE install 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'remember.*--finish' stderr && Exit 1
 
diff --git a/tests/python6.test b/tests/python6.test
index eb4fb4d..86dcfbb 100755
--- a/tests/python6.test
+++ b/tests/python6.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,6 +34,8 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 
 # Simulate no Python
-./configure PYTHON=: 2>stderr
-cat stderr
+./configure PYTHON=: 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'GREP ME:' stderr
+
+:
diff --git a/tests/python7.test b/tests/python7.test
index 62c1a1b..27b2e79 100755
--- a/tests/python7.test
+++ b/tests/python7.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,6 +34,8 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure 2>stderr
-cat stderr
+./configure 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'GREP ME:' stderr
+
+:
diff --git a/tests/python8.test b/tests/python8.test
index a50af22..51d02ad 100755
--- a/tests/python8.test
+++ b/tests/python8.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,6 +32,8 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure 2>stderr
-cat stderr
+./configure 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'GREP ME' stderr
+
+:
diff --git a/tests/python9.test b/tests/python9.test
index 9b23deb..6a91e9f 100755
--- a/tests/python9.test
+++ b/tests/python9.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,6 +33,8 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure 2>stderr
-cat stderr
+./configure 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 grep 'GREP ME' stderr
+
+:
diff --git a/tests/subobj.test b/tests/subobj.test
index df297f4..64edd0e 100755
--- a/tests/subobj.test
+++ b/tests/subobj.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2004, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -32,8 +33,8 @@ wish_SOURCES = generic/a.c generic/b.c
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing 2>stderr
-cat stderr
+$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 # Make sure compile is installed, and that Automake says so.
 grep 'install.*compile' stderr
 test -f compile
@@ -43,3 +44,5 @@ grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
 
 # Opportunistically test for a different bug.
 grep '^generic/b.\$(OBJEXT):.*dirstamp' Makefile.in
+
+:
diff --git a/tests/vars3.test b/tests/vars3.test
index 3d10a90..6b738ab 100755
--- a/tests/vars3.test
+++ b/tests/vars3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,8 +38,9 @@ EOF
 
 $ACLOCAL
 # Make sure this warning is print in the `portability' category.
-$AUTOMAKE --warnings=no-error,none,portability 2>stderr
-cat stderr
+$AUTOMAKE --warnings=no-error,none,portability 2>stderr \
+  || { cat stderr >&2; Exit 1; }
+cat stderr >&2
 
 # Lines number are printed in error message.
 # Use them to make sure errors are diagnosed against the right lines.


hooks/post-receive
-- 
GNU Automake



reply via email to

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