summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog23
-rwxr-xr-xtests/acsilent.test10
-rwxr-xr-xtests/subcond.test7
-rwxr-xr-xtests/subst.test12
-rwxr-xr-xtests/tags.test10
-rwxr-xr-xtests/unused.test11
-rwxr-xr-xtests/vars.test6
-rwxr-xr-xtests/version.test9
-rwxr-xr-xtests/version2.test11
-rwxr-xr-xtests/version4.test6
-rwxr-xr-xtests/vpath.test8
-rwxr-xr-xtests/vtexi2.test9
-rwxr-xr-xtests/werror.test6
-rwxr-xr-xtests/whoami.test5
14 files changed, 96 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ae8d6478..eb2a2383b 100644
--- 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.
diff --git a/tests/acsilent.test b/tests/acsilent.test
index 6ac7863f1..abbfc92b0 100755
--- a/tests/acsilent.test
+++ b/tests/acsilent.test
@@ -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
diff --git a/tests/subcond.test b/tests/subcond.test
index b04c47513..0269cacec 100755
--- a/tests/subcond.test
+++ b/tests/subcond.test
@@ -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
@@ -15,9 +15,12 @@
# 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
diff --git a/tests/subst.test b/tests/subst.test
index 7d45dae55..ebc73cadd 100755
--- a/tests/subst.test
+++ b/tests/subst.test
@@ -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
+
+:
diff --git a/tests/tags.test b/tests/tags.test
index 055989f68..1eaf56977 100755
--- a/tests/tags.test
+++ b/tests/tags.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,13 +19,13 @@
. ./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
diff --git a/tests/unused.test b/tests/unused.test
index a5b4da646..f406b43f1 100755
--- a/tests/unused.test
+++ b/tests/unused.test
@@ -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
@@ -15,8 +16,11 @@
# 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
diff --git a/tests/vars.test b/tests/vars.test
index ae711b0e5..6163a8d0b 100755
--- a/tests/vars.test
+++ b/tests/vars.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,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
diff --git a/tests/version.test b/tests/version.test
index bfa3f4334..a894a7556 100755
--- a/tests/version.test
+++ b/tests/version.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,10 +19,13 @@
. ./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
diff --git a/tests/version2.test b/tests/version2.test
index 993c0ba80..a25b82b1c 100755
--- a/tests/version2.test
+++ b/tests/version2.test
@@ -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
@@ -19,10 +19,13 @@
. ./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
diff --git a/tests/version4.test b/tests/version4.test
index 9ec0cbaf0..f8ceafed9 100755
--- a/tests/version4.test
+++ b/tests/version4.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
+set -e
+
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = 1.4-p3
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
diff --git a/tests/vpath.test b/tests/vpath.test
index 850aaebc6..a95f5b2bc 100755
--- a/tests/vpath.test
+++ b/tests/vpath.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,12 +19,14 @@
. ./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
diff --git a/tests/vtexi2.test b/tests/vtexi2.test
index 633fe1322..e1a1b93cf 100755
--- a/tests/vtexi2.test
+++ b/tests/vtexi2.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
@@ -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
diff --git a/tests/werror.test b/tests/werror.test
index 5c7a0b5c5..355f9d288 100755
--- a/tests/werror.test
+++ b/tests/werror.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
+set -e
+
: > Makefile.am
rm -f install-sh depcomp missing mkinstalldirs
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE --Werror --add-missing
diff --git a/tests/whoami.test b/tests/whoami.test
index f2dcab1aa..37bd81a04 100755
--- a/tests/whoami.test
+++ b/tests/whoami.test
@@ -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
@@ -17,8 +17,11 @@
# 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