]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Enable `errexit' shell flag in some test scripts.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 8 Jun 2010 14:09:18 +0000 (16:09 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 8 Jun 2010 18:38:26 +0000 (20:38 +0200)
* tests/subcond.test: Enabled `errexit' shell flag, and related
minor changes.
* tests/subst.test: Likewise.
* tests/tags.test: Likewise.
* tests/unused.test: Likewise.
* tests/vars.test: Likewise.
* tests/version4.test: Likewise.
* tests/vpath.test: Likewise.
* tests/vtexi2.test: Likewise.
* tests/werror.test: Likewise.
* tests/whoami.test: Likewise.
* tests/acsilent.test: Likewise, and don't use a command
substitution that can be easily avoided.
* tests/version.test: Enabled `errexit' shell flag, and related
minor changes.  Also, avoid deprecated constructs in the generated
`configure.in'.
* tests/version2.test: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14 files changed:
ChangeLog
tests/acsilent.test
tests/subcond.test
tests/subst.test
tests/tags.test
tests/unused.test
tests/vars.test
tests/version.test
tests/version2.test
tests/version4.test
tests/vpath.test
tests/vtexi2.test
tests/werror.test
tests/whoami.test

index 5ae8d6478e1eebe1557d9f686da50d0418e11e70..eb2a2383b28f97209f2b21906f59717cd020fb43 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2010-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Enable `errexit' shell flag in some test scripts.
+       * tests/subcond.test: Enabled `errexit' shell flag, and related
+       minor changes.
+       * tests/subst.test: Likewise.
+       * tests/vars.test: Likewise.
+       * tests/version4.test: Likewise.
+       * tests/vpath.test: Likewise.
+       * tests/vtexi2.test: Likewise.
+       * tests/werror.test: Likewise.
+       * tests/whoami.test: Likewise.
+       * tests/tags.test: Likewise, and avoid to crate an useless dummy
+       header file.
+       * tests/acsilent.test: Likewise, and don't use an easily-avoided
+       command substitution.
+       * tests/unused.test: Likewise, and don't use an easily-avoided
+       command substitution.
+       * tests/version.test: Likewise, and avoid deprecated constructs
+       in the generated `configure.in'.
+       * tests/version2.test: Likewise, and avoid deprecated constructs
+       in the generated `configure.in'.
+
 2010-06-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Prefer AUTOMAKE_fails over `$AUTOMAKE | grep' in tests.
index 6ac7863f153d1cb13814c1b055c39aba552daf7f..abbfc92b0405d034cd4f77e652c624dd8b3e9bfc 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2008  Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
@@ -18,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >configure.in <<EOF
 AC_INIT
 AM_INIT_GUILE_MODULE
@@ -32,5 +35,6 @@ module=[$1]
 AC_SUBST(module)])
 END
 
-$ACLOCAL > output 2>&1 || { cat output; Exit 1; }
-test -z "`cat output`"
+$ACLOCAL >output 2>&1 || { cat output; Exit 1; }
+cat output
+test ! -s output
index b04c47513ff2d1e7b733e72253df839e846f8724..0269cacec3b0ed8563e1bf573da59a211e63f19b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2006, 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
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # It is ok to have a conditional SUBDIRS when using gettext.
+
 required=gettext
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AM_GNU_GETTEXT
 AM_CONDITIONAL(MAUDE, true)
@@ -36,6 +39,6 @@ SUBDIRS =
 endif
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 # Gettext wants config.guess etc.
 $AUTOMAKE --add-missing
index 7d45dae558f235a3927a3ccd73794172828b92a7..ebc73caddde73ca4f5db6d1c8977fdbf0a279ae9 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2007, 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 +20,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 dnl This test used to have the following lines, which cannot have
 dnl worked sensibly with Autoconf for years, however:
@@ -32,7 +35,8 @@ END
 
 : > Makefile.am
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 grep '^\$1' Makefile.in && Exit 1
-Exit 0
+
+:
index 055989f68568c94acb5f9e7aca14f9a1d6abb09e..1eaf56977792a2e635b19dc3cc6e91dc9f7df5e2 100755 (executable)
@@ -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
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 noinst_HEADERS = iguana.h
 END
 
-: > iguana.h
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^ID:' Makefile.in
index a5b4da646eadddf97fb7f3f4af521a9809a1898b..f406b43f1b74647003b680c2394d421dbb45b597 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2002, 2003, 2008  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2002, 2003, 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
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for failing check for unused macros.  From Johan Danielsson.
+
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 MACRO_1
 MACRO_1_2
@@ -29,5 +33,6 @@ AC_DEFUN([MACRO_1_2], echo 12)
 AC_DEFUN([MACRO_1_2_3], echo 123)
 END
 
-$ACLOCAL 2> stderr || { cat stderr >&2; Exit 1; }
-test -z "`cat stderr`"
+$ACLOCAL 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+test ! -s stderr
index ae711b0e53373a53a56de653006d1285a13e63d6..6163a8d0b5b78501c90d015869bfeeada179b59d 100755 (executable)
@@ -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,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 MY_FLAGS_1=-DABC=345
 MY_FLAGS_2= -DABC=345
@@ -26,5 +28,5 @@ MY_FLAGS_3 =-DABC=345
 MY_FLAGS_4 = -DABC=345
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
index bfa3f4334cb21146550a08e50ebcfd45a1871c37..a894a7556ab177884f66921951af04d2135f78d5 100755 (executable)
@@ -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
 
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE([sh-utils], [1.12o])
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 : > Makefile.am
@@ -36,5 +39,5 @@ END
 : > ChangeLog
 : > THANKS
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE --gnits
index 993c0ba80411739058511677b116e7d53715ea70..a25b82b1ce3912454405d61db7e589743bad33c5 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 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
 
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT
-AM_INIT_AUTOMAKE([sh-utils], 1.12o, no)
-AC_OUTPUT(Makefile)
+AM_INIT_AUTOMAKE([sh-utils], [1.12o], [no])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 : > Makefile.am
@@ -36,5 +39,5 @@ END
 : > ChangeLog
 : > THANKS
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE --gnits
index 9ec0cbaf0c8f251a015112b36ae731ea69b675a2..f8ceafed94c890db7ff3848b27374bb6b953f6f3 100755 (executable)
@@ -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
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = 1.4-p3
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
index 850aaebc6edda76d657f6fc6205c8c650d61ca40..a95f5b2bc9575ffc47212be21845ae281337932b 100755 (executable)
@@ -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
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 VPATH = zardoz
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep 'VPATH.*@srcdir@' Makefile.in && Exit 1
 Exit 0
index 633fe1322f4d74c8f0badfac01e674a90fb6f208..e1a1b93cf29cfa687c5df41accc2a3f246be597f 100755 (executable)
@@ -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
@@ -21,6 +22,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = zardoz.texi
 END
@@ -34,7 +37,7 @@ END
 : > mdate-sh
 : > texinfo.tex
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^zardoz\.dvi:' Makefile.in
index 5c7a0b5c5428328cb533ac5613e01bdeafe4828d..355f9d288467a979f9e3152491a1fab2283ecf2a 100755 (executable)
@@ -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
 
 . ./defs || Exit 1
 
+set -e
+
 : > Makefile.am
 
 rm -f install-sh depcomp missing mkinstalldirs
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE --Werror --add-missing
index f2dcab1aa5ee3bf26ca2a80bc95c5f83154197df..37bd81a042b2a44d01ebe0440c349853ab8eb15f 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 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
 # Test to make sure aclocal doesn't barf on "WHO_AM_I=...".  Report
 # from Johan Danielsson (and a very nice bug report, too, I might
 # add).
+
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 WHO_AM_I=17
 END