2010-06-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Enable `errexit' shell flag in some test scripts.
+ * tests/dash.test: Enable `errexit' shell flag, and related
+ changes.
+ * tests/defun.test: Likewise.
+ * tests/defun2.test: Likewise.
+ * tests/dejagnu.test: Likewise.
+ * tests/double.test: Likewise.
+ * tests/distcom2.test: Likewise.
+ * tests/empty2.test: Likewise.
+ * tests/empty3.test: Likewise.
+ * tests/empty4.test: Likewise.
+ * tests/exdir.test: Likewise.
+ * tests/ext.test: Likewise.
+ * tests/extra.test: Likewise.
+ * tests/extra2.test: Likewise.
+ * tests/extra3.test: Likewise.
+ * tests/extra4.test: Likewise.
+ * tests/flibs.test: Likewise.
+ * tests/fnoc.test: Likewise.
+ * tests/fo.test: Likewise.
+ * tests/instexec.test: Likewise.
+ * tests/ltdeps.test: Likewise.
+ * tests/nodep.test: Likewise.
+ * tests/nodepcomp.test: Likewise.
+ * tests/f90only.test: Likewise, and remove botched/obsoleted
+ comments and unecessary commands.
+ * tests/fonly.test: Likewise, and removed botched/obsolted
+ comments and unecessary commands.
+ * tests/discover.test: Likewise, and made stricter.
+
Enable `errexit' shell flag in all tests cxx*.test.
* tests/cxx.test: Enabled `errexit' shell flag, and related
minor changes.
#! /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
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
include Make-lang
END
: > Make-lang
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
#! /bin/sh
-# Copyright (C) 1996, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
. ./defs || Exit 1
+set -e
+
cat > acinclude.m4 << 'END'
AC_DEFUN([AM_FUNC_TWO])
AC_DEFUN([AM_FUNC_ONE], [AC_REQUIRE([AM_FUNC_TWO])])
#! /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'
dnl if buggy this will require getloadavg.c
AC_PROG_CC
: > memcmp.c
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
#! /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'
AUTOMAKE_OPTIONS = dejagnu
TESTS = frob.test
: > frob.test
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^check-TESTS' Makefile.in
grep '^check-DEJAGNU' Makefile.in
#! /bin/sh
-# Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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
: > fsusage.c
-$ACLOCAL || Exit 1
-$AUTOMAKE 2>&1 | $FGREP fsusage.c || Exit 1
+$ACLOCAL
+AUTOMAKE_fails
+
+grep 'automatically discovered.*fsusage\.c.*explicitly mentioned' stderr
+
Exit 0
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
rm -f compile depcomp
-$ACLOCAL || Exit 1
-$AUTOMAKE --add-missing || Exit 1
+$ACLOCAL
+$AUTOMAKE --add-missing
-test -f compile || Exit 1
-test -f depcomp || Exit 1
+test -f compile
+test -f depcomp
sed -n -e '/^DIST_COMMON =.*\\$/ {
:loop
t loop
p
n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep compile || Exit 1
+ }' -e '/^DIST_COMMON =/ p' Makefile.in | grep compile
sed -n -e '/^DIST_COMMON =.*\\$/ {
:loop
t loop
p
n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep depcomp || Exit 1
+ }' -e '/^DIST_COMMON =/ p' Makefile.in | grep depcomp
#! /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
. ./defs || Exit 1
+set -e
+
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
bin_PROGRAMS = spice nutmeg help sconvert multidec nutmeg
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
#! /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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
pavel_SOURCES =
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'pavel\.[co]' Makefile.in && Exit 1
Exit 0
#! /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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
bin_PROGRAMS = pavel
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'pavel\.[co]' Makefile.in
#! /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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_SUBST(ZOO_OBJ)
zoo_LDADD = $(zoo_DEPENDENCIES)
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP zoo. Makefile.in && Exit 1
Exit 0
#! /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 << 'EOF'
htmldir = $(prefix)/html
html_DATA = zot.html
pkgdata_DATA = qbert
EOF
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^DATA' Makefile.in | grep html
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_F77
AC_PROG_FC
foo_SOURCES = 1.f 2.for 3.f90 4.f95 5.F 6.F90 7.F95 8.r 9.m 10.upc
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
for ext in f for f90 f95 F F90 F95 r m upc
do
#! /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_PROG_CC
END
EXTRA_PROGRAMS = zardoz
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-grep "^zardoz" Makefile.in || Exit 1
+grep "^zardoz" Makefile.in
# Can't have EXTRA clean rules.
grep 'clean.*EXTRA' Makefile.in && Exit 1
#! /bin/sh
-# Copyright (C) 1996, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 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_PROG_CC
END
bin_PROGRAMS = foo
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep EXTRA_foo_SOURCES Makefile.in && Exit 1
Exit 0
#! /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
. ./defs || Exit 1
+set -e
+
echo 'AC_SUBST(CODICIL)' >> configure.in
cat > Makefile.am << 'END'
sysconf_DATA = @CODICIL@
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 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
. ./defs || Exit 1
+set -e
+
echo 'AC_SUBST(CODICIL)' >> configure.in
cat > Makefile.am << 'END'
EXTRA_DATA = codicil.txt
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_FC
END
-# Tue Aug 11 09:50:48 1998 Matthew D. Langston <langston@SLAC.Stanford.EDU>
-#
-# This test currently fails with automake v. 1.3 since automake assumes
-# that elements of `bin_PROGRAMS' (e.g. zardoz) without a corresponding
-# `_SOURCES' (e.g. zardoz_SOURCES) should be compiled from `zardoz.c'
-# whether or not `zardoz.c' actually exists. For example, even if the
-# file `zardoz.c' doesn't exist but the file `zardoz.f' does exist, this
-# tests would still fail.
-#
-# Therefore, for now I have put in the line `zardoz_SOURCES = zardoz.f'
-# (see below) so that automake's top-level `make check' won't fail, but
-# this line should be removed once automake handles this situation
-# correctly.
-
cat > Makefile.am <<'END'
bin_PROGRAMS = zardoz
zardoz_SOURCES = zardoz.f90
END
-: > zardoz.f90
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'zardoz.f90' Makefile.in
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_F77
AC_F77_LIBRARY_LDFLAGS
: > zardoz.f
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '@FLIBS@' Makefile.in
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_F77
END
: > doe.f
: > jane.f
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '[^F]CC' Makefile.in | grep -v MKDEP && Exit 1
Exit 0
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_F77
END
: > doe.f
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP 'doe.$(OBJEXT)' Makefile.in
#! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_F77
END
-# Tue Aug 11 09:50:48 1998 Matthew D. Langston <langston@SLAC.Stanford.EDU>
-#
-# This test currently fails with automake v. 1.3 since automake assumes
-# that elements of `bin_PROGRAMS' (e.g. zardoz) without a corresponding
-# `_SOURCES' (e.g. zardoz_SOURCES) should be compiled from `zardoz.c'
-# whether or not `zardoz.c' actually exists. For example, even if the
-# file `zardoz.c' doesn't exist but the file `zardoz.f' does exist, this
-# tests would still fail.
-#
-# Therefore, for now I have put in the line `zardoz_SOURCES = zardoz.f'
-# (see below) so that automake's top-level `make check' won't fail, but
-# this line should be removed once automake handles this situation
-# correctly.
-
cat > Makefile.am <<'END'
bin_PROGRAMS = zardoz
zardoz_SOURCES = zardoz.f
END
-: > zardoz.f
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'zardoz.f' Makefile.in
#!/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
+
: > Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^install-exec:' Makefile.in
#! /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
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_LIBTOOL
AC_PROG_CXX
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'OBJECTS =$' Makefile.in && Exit 1
Exit 0
#! /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
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = no-dependencies
bin_PROGRAMS = zardoz
: > y.c
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '%' Makefile.in && Exit 1
Exit 0
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 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
. ./defs || Exit 1
+set -e
+
rm -f depcomp
: > Makefile.am
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE