+2010-12-02 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Enable `set -e' in more tests (plus some tweakings).
+ * tests/mkinstall.test: Enable `errexit' shell flag, and related
+ changes. Add a trailing `:' command, if needed.
+ * tests/mdate2.test: Likewise.
+ * tests/objc.test: Likewise.
+ * tests/noinst.test: Likewise.
+ * tests/outdir.test: Likewise.
+ * tests/number.test: Likewise.
+ * tests/pluseq.test: Likewise.
+ * tests/req.test: Likewise.
+ * tests/rulepat.test: Likewise.
+ * tests/specflg6.test: Likewise.
+ * tests/spell3.test: Likewise.
+ * tests/parse.test: Likewise, and ...
+ (configure.in): Use the stub created by ./defs, rather than
+ writing it from scratch. Remove useless calls to AC_PROG_RANLIB
+ and AC_OUTPUT.
+ * tests/mdate4.test: Likewise.
+ * tests/mkinstall.test: Likewise, and ...
+ (configure.in): ... drop useless call to `AC_OUTPUT'.
+ * tests/output.test: Enable `errexit' shell flag, and related
+ changes. Add a trailing `:' command.
+ (configure.in): Modernize.
+ * tests/output2.test: Likewise.
+ * tests/output3.test: Likewise.
+ * tests/output4.test: Likewise.
+ * tests/mdate3.test: Enable `errexit' shell flag, and related
+ changes. Prefer `$me' over hard-coded test name. Do not move
+ non-existent or useless files in the build auxiliary directory.
+ * tests/nodistdir.test: Enable `errexit' shell flag, and related
+ changes. Prefer trailing `:' over trailing `Exit 0'.
+ * tests/nodist.test: Likewise. Also, prefer cat + here-doc over
+ echo to create input test files, and do not create useless dummy
+ C source files.
+ * tests/nodist2.test: Likewise.
+ * tests/ppf77.test: Enable `errexit' shell flag, with related
+ changes. Add a trailing `:' command. Do not create useless
+ dummy source files.
+ * tests/spelling.test: Enable `errexit' shell flag, with related
+ changes. Add a trailing `:' command. Also, grep Automake error
+ message.
+ * tests/specflg3.test: Enable `errexit' shell flag, with related
+ changes. Avoid unportable use of `-e' option of fgrep. Prefer
+ trailing `:' over trailing `Exit 0'. Remove extra empty lines,
+ and cosmetic changes to whitespaces.
+ * tests/obsolete.test: Enable `errexit' shell flag, with related
+ changes. Improve verbosity. Other miscellanous changes.
+
2010-11-25 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix spurious failures in `silent*.test' for $CC != gcc
#! /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
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
END
echo '@setfilename textutils' > textutils.texi
# Use "././" to confuse Automake into thinking this is a subdir build.
-$ACLOCAL || Exit 1
-$AUTOMAKE ././Makefile || Exit 1
+$ACLOCAL
+$AUTOMAKE ././Makefile
grep 'mdate-sh' Makefile.in | grep -v SHELL
+
+:
#! /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
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT([mdate3], [1.0])
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([foo])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
: > foo/mdate-sh
mv install-sh foo
mv missing foo
-mv mkinstalldirs foo
-mv depcomp foo
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '[^/]mdate-sh' Makefile.in && Exit 1
Exit 0
#! /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
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
END
cat > Makefile.am << 'END'
@setfilename textutils.info
END
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOMAKE -a
+ls -l sub
test -f sub/mdate-sh
+
+:
#! /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'
pkgdata_DATA =
END
# The "././" prefix confuses Automake into thinking it is doing a
# subdir build. Yes, this is hacky.
-$ACLOCAL || Exit 1
-$AUTOMAKE ././Makefile || Exit 1
+$ACLOCAL
+$AUTOMAKE ././Makefile
grep ' /mkinstalldirs' 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
-echo AC_PROG_CC >> configure.in
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
cat > Makefile.am << 'END'
bin_PROGRAMS = eyeball
dist_eyeball_SOURCES = c.c
END
-: > a.c
-: > b.c
-: > c.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-grep '^am_eyeball_OBJECTS' Makefile.in || Exit 1
-grep '^DIST_SOURCES =' Makefile.in || Exit 1
+grep '^am_eyeball_OBJECTS' Makefile.in
+grep '^DIST_SOURCES =' Makefile.in
grep '^DIST_SOURCES =.*nodist' Makefile.in && Exit 1
-Exit 0
+:
#! /bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 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
. ./defs || Exit 1
-echo AC_PROG_CC >> configure.in
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = no-dist
eyeball_SOURCES = a.c
END
-: > a.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^dist:' Makefile.in && Exit 1
grep '^DIST_SOURCES =' Makefile.in && Exit 1
-Exit 0
+:
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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
+
cat > Makefile.am << 'END'
all-local:
exit 1
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^install[-a-z]*:.* all' 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
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
noinst_SCRIPTS = foo.sh
noinst_DATA = foo.xpm
AC_PROG_RANLIB
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'noinstdir' Makefile.in && Exit 1
grep 'checkdir' 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 >> configure.in << 'END'
AC_PROG_CC
END
bin_PROGRAMS = zardoz
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+grep '^zardoz_OBJECTS' Makefile.in
count=`grep -c '^zardoz_OBJECTS' Makefile.in`
test $count -eq 1
+
+:
#! /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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_OBJC
END
hello_SOURCES = hello.m
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^\.SUFFIXES:.*\.m' Makefile.in
+
+:
required=$2
. ./defs || Exit 1
+set -e
+
cat > configure.in << 'END'
AC_INIT
END
$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
"$testsrcdir/../m4/obsolete.m4" >> obs
cat obs >> configure.in
-$PERL -ne 'chomp; print "grep $_ stderr || Exit 1\n"; ' obs > obs.1
+$PERL -ne 'chomp; print "grep $_ output || Exit 1\n"; ' obs > obs.1
$PERL -ne 'chomp; print "grep $_ configure.in && Exit 1\n"; ' obs > obs.2
+echo : >> obs.1 # since it will be sourced, it must and with a success
+echo : >> obs.2 # ditto
+
+cat configure.in # for debugging
+cat obs.1 # ditto
+cat obs.2 # ditto
# Sanity check. Make sure we have added something to configure.in.
-test `cat configure.in | wc -l` -gt 1 || Exit 1
+test `wc -l <configure.in` -gt 1
-$ACLOCAL || Exit 1
+$ACLOCAL
# Expect Autoconf to complain about each of the macros in obs.
-$AUTOCONF -Wobsolete >stderr 2>&1
+$AUTOCONF -Wobsolete >output 2>&1 || { cat output; Exit 1; }
+cat output
. ./obs.1
# Make sure Autoupdate remove each of these macros.
-$AUTOUPDATE || Exit 1
+$AUTOUPDATE
. ./obs.2
# Autoconf should be able to grok the updated configure.in.
-$AUTOCONF || Exit 1
+$AUTOCONF
-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 <<'END'
pkgdata_DATA =
END
mkdir zardir
-$ACLOCAL || Exit 1
-$AUTOMAKE -Wno-obsolete --output-dir=zardir || Exit 1
+$ACLOCAL
+$AUTOMAKE -Wno-obsolete --output-dir=zardir
test -f Makefile.in && Exit 1
test -f zardir/Makefile.in
+
+:
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile frob/zardoz)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([Makefile frob/zardoz])
END
: > Makefile.am
mkdir frob
: > frob/zardoz.in
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile intl/intlh.inst po/Makefile.in misc/gettextize)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([Makefile intl/intlh.inst po/Makefile.in misc/gettextize])
END
: > Makefile.am
: > po/Makefile.in.am
: > misc/gettextize.in
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^gettextize' Makefile.in && Exit 1
Exit 0
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
-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([Makefile
tests/Makefile tests/defs],
[blah])
: > tests/Makefile.am
: > tests/defs.in
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(tests/Makefile tests/defs)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([tests/Makefile tests/defs])
END
mkdir tests
: > tests/defs.in
: > tests/Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep tests/defs.in tests/Makefile.in && Exit 1
Exit 0
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 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
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
-AC_PROG_RANLIB
-AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
doz.c
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP zar.cdoz Makefile.in && Exit 1
Exit 0
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
data_DATA = zar
data_DATA += doz
#! /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_F77
END
ppf_SOURCES = foo.F q.r
END
-: > foo.F
-: > q.r
-
-$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 > configure.in <<EOF
AC_INIT
AM_INIT_GUILE_MODULE
AC_SUBST(module)])
END
-$ACLOCAL || Exit 1
+$ACLOCAL
grep 'DEFUN.*INIT_AUTOMAKE' aclocal.m4
+
+:
#! /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'
$(srcdir)/Makefile.am:
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^$(srcdir)/Makefile\.am' Makefile.in
+
+:
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(test, 0.1)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
: > compile
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-$FGREP -e '-o foo-foo' Makefile.in || Exit 1
-
-$FGREP 'foo.o.o' Makefile.in && Exit 1
-$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && Exit 1
+$ACLOCAL
+$AUTOMAKE
-$FGREP '$(foo_CFLAGS)' Makefile.in || Exit 1
+$FGREP ' -o foo-foo' Makefile.in
+$FGREP 'foo.o.o' Makefile.in && Exit 1
+$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && Exit 1
+$FGREP '$(foo_CFLAGS)' Makefile.in
-Exit 0
+:
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
-AM_CONDITIONAL(BAR, true)
+AM_CONDITIONAL([BAR], [true])
END
cat > Makefile.am << 'END'
: > compile
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
uncondval=`$FGREP 'foo-foo.o: foo.c' Makefile.in`
foo_SOURCES += $(BAR_SRCS)
END
-$AUTOMAKE || Exit 1
+$AUTOMAKE
condval=`$FGREP 'foo-foo.o: foo.c' Makefile.in`
test "x$uncondval" = "x$condval"
+
+:
#! /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'
TAGS_DEPENDENCIES = joe
## Required to avoid error.
ETAGS_ARGS = joe
END
-$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 << 'EOF'
bni_PROGRAMS = zot
EOF
-if $ACLOCAL || Exit 1
-$AUTOMAKE; then
- Exit 1
-fi
-Exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'bni_PROGRAMS' stderr
+grep 'bnidir.*undefined' stderr
+
+: