A quick update. I added to each pr[0-9]*.test the description of the correspoding bug report, and also split the previous patch so that the changes to tests for PR and the changes tests for unrelated tests pr[!0-9]*.test are now done by two separated commits.
The updated patches are attached. Still no push (I'd like to address the issues with `aclocal*.test' before it). Regards, Steafno
From 59c1e183291efa650a801a1f4903b6c481770d2a Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Sun, 8 Aug 2010 16:45:17 +0200 Subject: [PATCH 1/3] PR tests: add excerpts from original bug reports, for clarity. * tests/pr2.test: Ditto. * tests/pr9.test: Likewise. * tests/pr72.test: Likewise. * tests/pr87.test: Likewise. * tests/pr211.test: Likewise. * tests/pr220.test: Likewise. * tests/pr224.test: Likewise. * tests/pr229.test: Likewise. * tests/pr243.test: Likewise. * tests/pr266.test: Likewise. * tests/pr279.test: Likewise, and tell to keep it in sync with its sister test. * tests/pr279-2.test: Likewise. --- ChangeLog | 17 +++++++++++++++++ tests/pr2.test | 12 ++++++++++++ tests/pr211.test | 11 +++++++++++ tests/pr220.test | 6 ++++++ tests/pr224.test | 9 ++++++++- tests/pr229.test | 1 + tests/pr243.test | 10 ++++++++++ tests/pr266.test | 1 + tests/pr279-2.test | 8 ++++++++ tests/pr279.test | 8 ++++++++ tests/pr307.test | 14 ++++++++++++++ tests/pr72.test | 2 ++ tests/pr87.test | 1 + tests/pr9.test | 7 +++++++ 14 files changed, 106 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index b446db9..0756481 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2010-08-09 Stefano Lattarini <stefano.lattar...@gmail.com> + + Tests for PR: add excerpts from original bug report, for clarity. + * tests/pr2.test: Ditto. + * tests/pr9.test: Likewise. + * tests/pr72.test: Likewise. + * tests/pr87.test: Likewise. + * tests/pr211.test: Likewise. + * tests/pr220.test: Likewise. + * tests/pr224.test: Likewise. + * tests/pr229.test: Likewise. + * tests/pr243.test: Likewise. + * tests/pr266.test: Likewise. + * tests/pr279.test: Likewise, and tell to keep it in sync + with its sister test. + * tests/pr279-2.test: Likewise. + 2010-08-08 Stefano Lattarini <stefano.lattar...@gmail.com> Tweak, extend and improve tests `cond[a-z]*.test'. diff --git a/tests/pr2.test b/tests/pr2.test index 258a8ef..8330331 100755 --- a/tests/pr2.test +++ b/tests/pr2.test @@ -16,11 +16,23 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Test for bug reported in PR 2. +# "make dist" fails for AC_OUTPUT(README.foo:templ/README.foo.in). +# +# == Report == +# When my AC_OUTPUT macro in configure.in contains something +# like the following (among the Makefiles) +# README.foo:templ/README.foo.in +# the generated dist target in the Makefile.in fails, +# because DIST_COMMON will contain templ/README.foo.in +# and the dist target will try to copy templ/README.foo.in +# to the distribution directory before it creates a templ +# subdirectory in the distribution directory. . ./defs || Exit 1 set -e +# Please keep this underquoted and old-style. cat > configure.in << 'END' AC_INIT AM_INIT_AUTOMAKE(nonesuch, nonesuch) diff --git a/tests/pr211.test b/tests/pr211.test index 9344fd2..f29797a 100755 --- a/tests/pr211.test +++ b/tests/pr211.test @@ -15,6 +15,17 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Test for PR 211. +# +# == Description == +# Suppose you have a library and an ltlibrary in the same +# directory which use the same source: +# +# libfoo_la_SOURCES = foo.c +# libbar_a_SOURCES = foo.c +# +# In this case foo.c will be compiled twice but using different +# compilers. This is a conflict. In this case the user should +# rename one of the `foo.o's. required=libtoolize . ./defs || Exit 1 diff --git a/tests/pr220.test b/tests/pr220.test index 25e1f0e..9525694 100755 --- a/tests/pr220.test +++ b/tests/pr220.test @@ -15,6 +15,12 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Test for PR automake/220. +# Test for problems when conditionals are not actually defined. +# Check that the problems is diagnosed by configure. +# This isn't perfect (ideally we'd like an error from autoconf), +# but it is the best we can do. It certainly makes it easier +# to debug the problem. +# Note that this should be also in the documentation. required=gcc . ./defs || Exit 1 diff --git a/tests/pr224.test b/tests/pr224.test index fdcb997..63f78f1 100755 --- a/tests/pr224.test +++ b/tests/pr224.test @@ -14,7 +14,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# Test for $(top_srcdir) with dependencies. +# Test for PR automake/224: $(top_srcdir) w.r.t. dependencies. +# +# == Description == +# Dependency tracking data should be stored in in the relative path +# of the source file, as opposed the object file. +# I.e., for `foo.c' in `$(top_srcdir)/bar', being built in +# `$(top_srcdir)/build', the location of the `.deps' directory +# should be `$(top_builddir)/bar/.deps'. required=gcc . ./defs || Exit 1 diff --git a/tests/pr229.test b/tests/pr229.test index a97ef4f..3efa6ed 100755 --- a/tests/pr229.test +++ b/tests/pr229.test @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +# Test for PR automake/229. # Make sure AC_CYGWIN requires config.{sub,guess}. # Reported by James Youngman. diff --git a/tests/pr243.test b/tests/pr243.test index a5e869e..cf39b88 100755 --- a/tests/pr243.test +++ b/tests/pr243.test @@ -15,6 +15,16 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Test for PR 243. +# AM_OUTPUT_DEPENDENCY_COMMANDS doesn't handle +# `Makefile:Makefile.in:tail.mk' in AC_OUTPUT. +# +# == Report == +# If configure.in has something like: +# AC_OUTPUT(Makefile:Makefile.in:tail.mk) +# then config.status cannot parse the Makefile to build the +# dependency files in the .deps directory. This is because +# the AM_OUTPUT_DEPENDENCY_COMMANDS macro cannot cope with +# the colon in the CONFIG_FILES variable. . ./defs || Exit 1 diff --git a/tests/pr266.test b/tests/pr266.test index a1cd2fe..f2b54dd 100755 --- a/tests/pr266.test +++ b/tests/pr266.test @@ -15,6 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Test for PR 266. +# Dependency tracking -vs- nonstandard Makefile names . ./defs || Exit 1 diff --git a/tests/pr279-2.test b/tests/pr279-2.test index 286e33a..5bc9f85 100755 --- a/tests/pr279-2.test +++ b/tests/pr279-2.test @@ -15,6 +15,14 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Another test related to PR 279. +# Multiple DEPENDENCIES on conditionals. +# Please keep this in sync with sister test pr279.test. +# +# == Report == +# When defining xxx_LDADD and xxx_DEPENDENCIES variables where the +# xxx_LDADD one contains values set in conditionals, automake will +# fail with messages like: +# foo_DEPENDENCIES was already defined in condition TRUE, ... . ./defs || Exit 1 diff --git a/tests/pr279.test b/tests/pr279.test index 50dff53..ba11b2d 100755 --- a/tests/pr279.test +++ b/tests/pr279.test @@ -15,6 +15,14 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Test for PR 279. +# Multiple DEPENDENCIES on conditionals. +# Please keep this in sync with sister test pr279-2.test. +# +# == Report == +# When defining xxx_LDADD and xxx_DEPENDENCIES variables where the +# xxx_LDADD one contains values set in conditionals, automake will +# fail with messages like: +# foo_DEPENDENCIES was already defined in condition TRUE, ... . ./defs || Exit 1 diff --git a/tests/pr307.test b/tests/pr307.test index 0091415..9890289 100755 --- a/tests/pr307.test +++ b/tests/pr307.test @@ -17,6 +17,20 @@ # Test for PR 307: depcomp with depmode=dashmstdout libtool race condition # Report from Laurent Morichetti. # (Also exercises check_LTLIBRARIES.) +# +# == Report == +# The dashmstdout depmode calls libtool in parallel to generate the +# dependencies (with -M flag) and to build the objfile (both have +# --mode=compile and -o). +# The process with 'libtool --mode=compile .* -M' can corrupt the objfile +# as none is generated by the compiler. Since --mode=compile and -o are +# set libtool assumes that a objfile should be generated and will execute +# invalid $mv & $LN_S. +# +# == Fix == +# Now 'depcomp' never compute dependencies in the background, as this can +# cause races with libtool. Compute the dependencies after the actual +# compilation. required='libtoolize gcc' . ./defs || Exit 1 diff --git a/tests/pr72.test b/tests/pr72.test index d67c17b..767b5d2 100755 --- a/tests/pr72.test +++ b/tests/pr72.test @@ -15,6 +15,8 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Test for PR 72 +# Empty _SOURCES results in $(LINK) undefined. + required=libtool . ./defs || Exit 1 diff --git a/tests/pr87.test b/tests/pr87.test index 369849b..187d5ea 100755 --- a/tests/pr87.test +++ b/tests/pr87.test @@ -15,6 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Test for PR automake/87. +# "make distcheck" fails when two source dirs exist. required=gcc . ./defs || Exit 1 diff --git a/tests/pr9.test b/tests/pr9.test index dab9734..788fd64 100755 --- a/tests/pr9.test +++ b/tests/pr9.test @@ -15,6 +15,13 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Test for bug in PR 9. +# "make dist" incorrect when AC_CONFIG_AUX_DIR is present. +# +# == Report == +# When AC_CONFIG_AUX_DIR is set (in my case to `support'), make dist +# no longer automatically includes config.guess, config.sub, install-sh, +# ltconfig, ltmain.sh, mdate-sh, missing, and mkinstalldirs. In fact, +# the entire `support/' directory is omitted. required=gzip . ./defs || Exit 1 -- 1.7.1
From 5cde29630fa85bc03f0e6e9e4db8e22ba7c603ee Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Sat, 26 Jun 2010 15:33:50 +0200 Subject: [PATCH 2/3] Modernize, improve and extend tests for PR (`pr[0-9]*.test'). * tests/pr2.test: Add trailing `:' command. * tests/pr229.test: Likewise. * tests/pr401.test: Likewise. * tests/pr401b.test: Likewise. * tests/pr401c.test: Likewise. * tests/pr300-prog.test: Likewise, plus cosmetic changes in spacing. * tests/pr300-lib.test: Likewise. * tests/pr300-ltlib.test: Likewise, and ensure verbose printing of captured make stdout. * tests/pr211.test: Add trailing `:' command. Also, use the `configure.in' stub created by ./defs, rather than writing it from scratch. * tests/pr204.test: Likewise, plus cosmetic spacing changes. * tests/pr287.test: Likewise, and move setting of `errexit' shell flag earlier in the script (just after inclusion of ./defs). * tests/pr220.test: Make grepping of Automake's stderr stricter. Also, add trailing `:' command, and cosmetic changes in spacing. * tests/pr224.test: Move setting of `errexit' shell flag earlier in the script (just after inclusion of ./defs). Do not export `CC=gcc' to configure explicitly (it's already exported globally in ./defs, since we have "gcc" in $required). Use the stub for `configure.in' created by ./defs, rather than writing it from scratch. Do not create dummy files required by "gnu" mode (e.g. README, NEWS), since we run automake in foreign mode anyway. * tests/pr72.test: Enable `errexit' shell flags, and related changes. Extend existing checks a bit. * tests/pr9.test: Likewise. Also, avoid obolescent constructs in the generated `configure.in', and extend existing checks over the generated tarball a bit. * tests/pr87.test: Enable `errexit' shell flags, and related changes. Add a trailing `:' command. Also, do not create dummy files required by "gnu" mode (e.g. README, NEWS), since we run automake in foreign mode anyway. * tests/pr243.test: Avoid obolescent constructs in the generated `configure.in'. Enable the `errexit' shell flag, and related changes. Cosmetic changes to spacing, add trailing `:' command, and add a "FIXME" comment. * tests/pr266.test: Likewise, and add explicit command line switch `--enable-dependecy-tracking' to the ./configure call. * tests/pr279.test: Avoid obolescent constructs in the generated `configure.in'; also, use the `configure.in' stub created by ./defs, rather than writing it from scratch. Enable `errexit' shell flag, and related changes. Add trailing `:' command. * tests/pr279-2.test: Likewise, and make grepping of Makefile.in stricter. * tests/pr307.test: Move setting of `errexit' shell flag earlier in the script (just after inclusion of ./defs). Escape literal dots in grep regular expressions. Also, add a trailing `:' command, and cosmetic changes to spacing. --- ChangeLog | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/pr2.test | 4 ++- tests/pr204.test | 11 +++++---- tests/pr211.test | 10 ++++---- tests/pr220.test | 9 +++++-- tests/pr224.test | 20 +++++++----------- tests/pr229.test | 5 +++- tests/pr243.test | 27 ++++++++++++++---------- tests/pr266.test | 29 +++++++++++++++----------- tests/pr279-2.test | 19 +++++++++-------- tests/pr279.test | 13 ++++++----- tests/pr287.test | 15 +++++++------ tests/pr300-lib.test | 6 ++++- tests/pr300-ltlib.test | 6 ++++- tests/pr300-prog.test | 6 ++++- tests/pr307.test | 13 +++++++---- tests/pr401.test | 4 ++- tests/pr401b.test | 4 ++- tests/pr401c.test | 4 ++- tests/pr72.test | 12 +++++++--- tests/pr87.test | 26 ++++++++++++----------- tests/pr9.test | 41 ++++++++++++++++++++++++------------ 22 files changed, 223 insertions(+), 113 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0756481..b0b010e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,57 @@ 2010-08-09 Stefano Lattarini <stefano.lattar...@gmail.com> + Modernize, improve and extend tests for PR (`pr[0-9]*.test'). + * tests/pr2.test: Add trailing `:' command. + * tests/pr229.test: Likewise. + * tests/pr401.test: Likewise. + * tests/pr401b.test: Likewise. + * tests/pr401c.test: Likewise. + * tests/pr300-prog.test: Likewise, plus cosmetic changes in + spacing. + * tests/pr300-lib.test: Likewise. + * tests/pr300-ltlib.test: Likewise, and ensure verbose printing + of captured make stdout. + * tests/pr211.test: Add trailing `:' command. Also, use the + `configure.in' stub created by ./defs, rather than writing it + from scratch. + * tests/pr204.test: Likewise, plus cosmetic spacing changes. + * tests/pr287.test: Likewise, and move setting of `errexit' shell + flag earlier in the script (just after inclusion of ./defs). + * tests/pr220.test: Make grepping of Automake's stderr stricter. + Also, add trailing `:' command, and cosmetic changes in spacing. + * tests/pr224.test: Move setting of `errexit' shell flag earlier + in the script (just after inclusion of ./defs). Do not export + `CC=gcc' to configure explicitly (it's already exported globally + in ./defs, since we have "gcc" in $required). Use the stub for + `configure.in' created by ./defs, rather than writing it from + scratch. Do not create dummy files required by "gnu" mode (e.g. + README, NEWS), since we run automake in foreign mode anyway. + * tests/pr72.test: Enable `errexit' shell flags, and related + changes. Extend existing checks a bit. + * tests/pr9.test: Likewise. Also, avoid obolescent constructs in + the generated `configure.in', and extend existing checks over the + generated tarball a bit. + * tests/pr87.test: Enable `errexit' shell flags, and related + changes. Add a trailing `:' command. Also, do not create dummy + files required by "gnu" mode (e.g. README, NEWS), since we run + automake in foreign mode anyway. + * tests/pr243.test: Avoid obolescent constructs in the generated + `configure.in'. Enable the `errexit' shell flag, and related + changes. Cosmetic changes to spacing, add trailing `:' command, + and add a "FIXME" comment. + * tests/pr266.test: Likewise, and add explicit command line switch + `--enable-dependecy-tracking' to the ./configure call. + * tests/pr279.test: Avoid obolescent constructs in the generated + `configure.in'; also, use the `configure.in' stub created by + ./defs, rather than writing it from scratch. Enable `errexit' + shell flag, and related changes. Add trailing `:' command. + * tests/pr279-2.test: Likewise, and make grepping of Makefile.in + stricter. + * tests/pr307.test: Move setting of `errexit' shell flag earlier + in the script (just after inclusion of ./defs). Escape literal + dots in grep regular expressions. Also, add a trailing `:' + command, and cosmetic changes to spacing. + Tests for PR: add excerpts from original bug report, for clarity. * tests/pr2.test: Ditto. * tests/pr9.test: Likewise. diff --git a/tests/pr2.test b/tests/pr2.test index 8330331..ceb2729 100755 --- a/tests/pr2.test +++ b/tests/pr2.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006 Free Software +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006, 2010 Free Software # Foundation, Inc. # # This program is free software; you can redistribute it and/or modify @@ -50,3 +50,5 @@ $AUTOMAKE ./configure $MAKE distdir test -f nonesuch-nonesuch/templ/README.foo.in + +: diff --git a/tests/pr204.test b/tests/pr204.test index 2944449..22a1e54 100755 --- a/tests/pr204.test +++ b/tests/pr204.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -22,13 +22,10 @@ required='bison gcc' set -e -cat > configure.in <<'EOF' -AC_INIT(pr204, 0.1) -AM_INIT_AUTOMAKE +cat >> configure.in <<'EOF' AM_MAINTAINER_MODE AC_PROG_CC AC_PROG_YACC -AC_CONFIG_FILES(Makefile) AC_OUTPUT EOF @@ -64,8 +61,10 @@ cp parse.y parse2.y $ACLOCAL $AUTOCONF $AUTOMAKE -a + ./configure $MAKE distdirtest + # Make sure parse.c and parse2.c are still targets. $MAKE parse.c parse2.c test -f parse.c @@ -78,3 +77,5 @@ touch parse.y $sleep $MAKE parse.c parse2.c test `ls -1t parse.c parse.y | sed 1q` = parse.c + +: diff --git a/tests/pr211.test b/tests/pr211.test index f29797a..6778f7a 100755 --- a/tests/pr211.test +++ b/tests/pr211.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -32,12 +32,10 @@ required=libtoolize set -e -cat > configure.in << 'END' -AC_INIT(Makefile.am) -AM_INIT_AUTOMAKE(hello,0.23) +cat >> configure.in << 'END' AC_PROG_CC AC_PROG_LIBTOOL -AC_OUTPUT(Makefile) +AC_OUTPUT END cat > Makefile.am << 'END' @@ -51,3 +49,5 @@ libtoolize $ACLOCAL AUTOMAKE_fails -a $FGREP 'foo.$(OBJEXT)' stderr + +: diff --git a/tests/pr220.test b/tests/pr220.test index 9525694..95212ab 100755 --- a/tests/pr220.test +++ b/tests/pr220.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 2001, 2002, 2004, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2004, 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 @@ -27,7 +28,7 @@ required=gcc set -e -cat >main.c <<EOF +cat > main.c <<'EOF' int main() { return 0; } EOF @@ -63,4 +64,6 @@ cd build # configure should fail since we've done something invalid. ../configure 2>stderr && { cat stderr >&2; Exit 1; } cat stderr >&2 -grep NEVER_TRUE stderr +grep 'conditional.*NEVER_TRUE' stderr + +: diff --git a/tests/pr224.test b/tests/pr224.test index 63f78f1..00a7aad 100755 --- a/tests/pr224.test +++ b/tests/pr224.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 @@ -26,6 +26,8 @@ required=gcc . ./defs || Exit 1 +set -e + mkdir foo cat >foo/main.c <<'EOF' @@ -38,30 +40,24 @@ bin_PROGRAMS = bar bar_SOURCES = foo/main.c EOF -cat >configure.in <<'EOF' -AC_INIT(foo/main.c) -AC_CONFIG_AUX_DIR(.) -AM_INIT_AUTOMAKE(test_am, 1.0) +cat >>configure.in <<'EOF' AC_PROG_CC AM_PROG_CC_C_O -AC_OUTPUT(Makefile) +AC_OUTPUT EOF -touch README NEWS AUTHORS ChangeLog - mkdir build -set -e - $ACLOCAL $AUTOCONF $AUTOMAKE -a cd build -CC='gcc' ../configure -$MAKE +../configure +$MAKE test -d foo/.deps $MAKE distclean test -d foo/.deps && Exit 1 + : diff --git a/tests/pr229.test b/tests/pr229.test index 3efa6ed..0d3f153 100755 --- a/tests/pr229.test +++ b/tests/pr229.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 @@ -30,5 +30,8 @@ EOF $ACLOCAL $AUTOMAKE -a + test -f config.sub test -f config.guess + +: diff --git a/tests/pr243.test b/tests/pr243.test index cf39b88..58fb2a8 100755 --- a/tests/pr243.test +++ b/tests/pr243.test @@ -28,27 +28,32 @@ . ./defs || Exit 1 -cat > configure.in << 'END' -AC_INIT(foo, 0.1, d...@null) -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +set -e + +cat > configure.in << END +AC_INIT([$me], [1.0]) +AM_INIT_AUTOMAKE AC_PROG_CC -AC_CONFIG_FILES(Makefile:Makefile.in:tail.mk) +AC_CONFIG_FILES([Makefile:Makefile.in:tail.mk]) AC_OUTPUT END : > tail.mk cat > Makefile.am << 'END' -include_HEADERS = 3dfx.h linutil.h -noinst_HEADERS = fx64.h fxdll.h fximg.h fxglob.h \ - fxos.h fxver.h glob.h +include_HEADERS = 3dfx.h linutil.h +noinst_HEADERS = fx64.h fxdll.h fximg.h fxglob.h \ + fxos.h fxver.h glob.h noinst_PROGRAMS = fxmisc -fxmisc_SOURCES = fx64.c fximg.c fxos.c linutil.c +fxmisc_SOURCES = fx64.c fximg.c fxos.c linutil.c END -$ACLOCAL || Exit 1 -$AUTOMAKE || Exit 1 -$AUTOCONF || Exit 1 +$ACLOCAL +$AUTOMAKE +$AUTOCONF +# FIXME: require compiler in $required rather than skipping here ./configure || Exit $? test -f .deps/fx64.Po + +: diff --git a/tests/pr266.test b/tests/pr266.test index f2b54dd..2bace6f 100755 --- a/tests/pr266.test +++ b/tests/pr266.test @@ -19,25 +19,30 @@ . ./defs || Exit 1 -cat > configure.in << 'END' -AC_INIT(foo, 0.1, d...@null) -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +set -e + +cat > configure.in << END +AC_INIT([$me], [1.0]) +AM_INIT_AUTOMAKE AC_PROG_CC -AC_CONFIG_FILES(Maudefile) +AC_CONFIG_FILES([Maudefile]) AC_OUTPUT END cat > Maudefile.am << 'END' -include_HEADERS = 3dfx.h linutil.h -noinst_HEADERS = fx64.h fxdll.h fximg.h fxglob.h \ - fxos.h fxver.h glob.h +include_HEADERS = 3dfx.h linutil.h +noinst_HEADERS = fx64.h fxdll.h fximg.h fxglob.h \ + fxos.h fxver.h glob.h noinst_PROGRAMS = fxmisc -fxmisc_SOURCES = fx64.c fximg.c fxos.c linutil.c +fxmisc_SOURCES = fx64.c fximg.c fxos.c linutil.c END -$ACLOCAL || Exit 1 -$AUTOMAKE || Exit 1 -$AUTOCONF || Exit 1 -./configure || Exit $? +$ACLOCAL +$AUTOMAKE +$AUTOCONF +# FIXME: require compiler in $required rather than skipping here +./configure --enable-dependency-tracking || Exit $? test -f .deps/fx64.Po + +: diff --git a/tests/pr279-2.test b/tests/pr279-2.test index 5bc9f85..f4e6fb2 100755 --- a/tests/pr279-2.test +++ b/tests/pr279-2.test @@ -26,12 +26,11 @@ . ./defs || Exit 1 -cat > configure.in << 'END' -AC_INIT(foo, 0.1, d...@null) -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +set -e + +cat >> configure.in << 'END' AC_PROG_CC -AM_CONDITIONAL(FOOTEST, false) -AC_CONFIG_FILES(Makefile) +AM_CONDITIONAL([FOOTEST], [false]) AC_OUTPUT END @@ -45,8 +44,10 @@ endif bin_PROGRAMS = foo END -$ACLOCAL || Exit 1 -$AUTOMAKE || Exit 1 +$ACLOCAL +$AUTOMAKE + +grep '^...@footest_true@foo_DEPENDENCIES *= *zardoz$' Makefile.in +grep '^...@footest_false@foo_DEPENDENCIES *= *maude$' Makefile.in -grep '@foo_DEPENDENCIES = zardoz' Makefile.in || Exit 1 -grep '@foo_DEPENDENCIES = maude' Makefile.in || Exit 1 +: diff --git a/tests/pr279.test b/tests/pr279.test index ba11b2d..d658668 100755 --- a/tests/pr279.test +++ b/tests/pr279.test @@ -26,12 +26,11 @@ . ./defs || Exit 1 -cat > configure.in << 'END' -AC_INIT(foo, 0.1, d...@null) -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +set -e + +cat >> configure.in << 'END' AC_PROG_CC -AM_CONDITIONAL(FOOTEST, false) -AC_CONFIG_FILES(Makefile) +AM_CONDITIONAL([FOOTEST], [false]) AC_OUTPUT END @@ -47,5 +46,7 @@ foo_LDADD = ${xtralib} foo_DEPENDENCIES = END -$ACLOCAL || Exit 1 +$ACLOCAL $AUTOMAKE + +: diff --git a/tests/pr287.test b/tests/pr287.test index 58553b5..3a6f902 100755 --- a/tests/pr287.test +++ b/tests/pr287.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2007 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -18,11 +18,10 @@ . ./defs || Exit 1 -cat > configure.in << 'END' -AC_INIT(foo, 0.1, d...@null) -AM_INIT_AUTOMAKE +set -e + +cat >> configure.in << 'END' AC_PROG_CC -AC_CONFIG_FILES(Makefile) AC_OUTPUT END @@ -38,13 +37,15 @@ END chmod +x foo -set -e - mkdir install $ACLOCAL $AUTOCONF $AUTOMAKE -a + ./configure "--prefix=`cd install && pwd`" + $MAKE $MAKE distdir + +: diff --git a/tests/pr300-lib.test b/tests/pr300-lib.test index 3d2fde5..ee46b4b 100755 --- a/tests/pr300-lib.test +++ b/tests/pr300-lib.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2007 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -46,7 +46,9 @@ END $ACLOCAL $AUTOCONF $AUTOMAKE --copy --add-missing + ./configure --prefix "`pwd`/inst" + $MAKE test -f subdir/liba.a @@ -66,3 +68,5 @@ $MAKE install-strip test -f inst/lib/liba.a test -f inst/lib/subdir/libb.a + +: diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test index c6f9a5e..c47f32e 100755 --- a/tests/pr300-ltlib.test +++ b/tests/pr300-ltlib.test @@ -48,8 +48,10 @@ libtoolize $ACLOCAL $AUTOCONF $AUTOMAKE --copy --add-missing + ./configure --prefix "`pwd`/inst" -$MAKE V=1 >stdout + +$MAKE V=1 >stdout || { cat stdout; Exit 1; } cat stdout grep 'liba.la .*-rpath .*lib' stdout @@ -75,3 +77,5 @@ $MAKE install-strip test -f inst/lib/liba.la test -f inst/lib/subdir/libb.la + +: diff --git a/tests/pr300-prog.test b/tests/pr300-prog.test index 0b226c6..917a8a2 100755 --- a/tests/pr300-prog.test +++ b/tests/pr300-prog.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 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 @@ -63,8 +63,12 @@ END $ACLOCAL $AUTOCONF $AUTOMAKE --copy --add-missing + ./configure --prefix "`pwd`/inst" + $MAKE test-all $MAKE test-install $MAKE test-uninstall $MAKE test-install-strip + +: diff --git a/tests/pr307.test b/tests/pr307.test index 9890289..7676c4b 100755 --- a/tests/pr307.test +++ b/tests/pr307.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -35,6 +35,8 @@ required='libtoolize gcc' . ./defs || Exit 1 +set -e + cat >> configure.in << 'END' AC_PROG_CC AC_PROG_LIBTOOL @@ -48,8 +50,8 @@ librace_la_SOURCES = a.c b.c c.c d.c e.c f.c g.c h.c # Make sure the dependencies are updated. check-local: for i in $(librace_la_SOURCES:.c=.Plo); do \ - echo checking ./$(DEPDIR)/$$i; \ - grep foo.h ./$(DEPDIR)/$$i >tst || exit 1; \ + echo "checking ./$(DEPDIR)/$$i"; \ + grep 'foo\.h' ./$(DEPDIR)/$$i >tst || exit 1; \ test `wc -l <tst` -eq 2 || exit 1; \ done END @@ -63,8 +65,6 @@ int $i() { return 0; } EOF done -set -e - libtoolize --force $ACLOCAL $AUTOCONF @@ -75,6 +75,7 @@ $AUTOMAKE -a grep am_cv_CC_dependencies_compiler_type configure ./configure am_cv_CC_dependencies_compiler_type=dashmstdout + $MAKE test -f librace.la && Exit 1 $MAKE check @@ -89,3 +90,5 @@ $MAKE check test -f librace.la test -f tst # a proof that check-local was run + +: diff --git a/tests/pr401.test b/tests/pr401.test index 7a092bf..b68b5ed 100755 --- a/tests/pr401.test +++ b/tests/pr401.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005, 2006, 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 @@ -178,3 +178,5 @@ $AUTOCONF $AUTOMAKE ./configure $MAKE distcheck + +: diff --git a/tests/pr401b.test b/tests/pr401b.test index f7f6344..8e296ef 100755 --- a/tests/pr401b.test +++ b/tests/pr401b.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005, 2006, 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 @@ -179,3 +179,5 @@ $AUTOCONF $AUTOMAKE ./configure $MAKE distcheck + +: diff --git a/tests/pr401c.test b/tests/pr401c.test index fc2f5de..8682dc0 100755 --- a/tests/pr401c.test +++ b/tests/pr401c.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005, 2006, 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 @@ -181,3 +181,5 @@ $AUTOCONF $AUTOMAKE ./configure $MAKE distcheck + +: diff --git a/tests/pr72.test b/tests/pr72.test index 767b5d2..ab911ad 100755 --- a/tests/pr72.test +++ b/tests/pr72.test @@ -1,5 +1,5 @@ #! /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 @@ -20,6 +20,8 @@ required=libtool . ./defs || Exit 1 +set -e + cat >> configure.in << 'END' AC_PROG_CC AC_PROG_LIBTOOL @@ -36,7 +38,9 @@ END : > config.guess : > config.sub -$ACLOCAL || Exit 1 -$AUTOMAKE || Exit 1 +$ACLOCAL +$AUTOMAKE + +grep '^LINK =' Makefile.in -grep '^LINK ' Makefile.in +: diff --git a/tests/pr87.test b/tests/pr87.test index 187d5ea..31e6482 100755 --- a/tests/pr87.test +++ b/tests/pr87.test @@ -1,5 +1,5 @@ #! /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 @@ -20,6 +20,8 @@ required=gcc . ./defs || Exit 1 +set -e + subdirs="foo bar" for i in $subdirs; do @@ -37,7 +39,7 @@ echo "SUBDIRS = $subdirs" > Makefile.am cat >configure.in <<EOF AC_INIT(`echo $subdirs | sed 's|\([a-z][a-z]*\).*|\1/\1.c|'`) AC_CONFIG_AUX_DIR(.) -AM_INIT_AUTOMAKE(test_am, 1.0) +AM_INIT_AUTOMAKE($me, 1.0) AC_PROG_CC AC_OUTPUT(Makefile `echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`) EOF @@ -46,15 +48,11 @@ EOF CFLAGS= export CFLAGS -touch README NEWS AUTHORS ChangeLog - mkdir build -# We use gcc and not gcc -traditional as the latter fails on some -# Linux boxes (Red Hat 5.1 in particular). -$ACLOCAL \ - && $AUTOCONF \ - && $AUTOMAKE -a || Exit 1 +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a # Regression test for bug where `.c.o:' is followed by blank line. (while read line; do @@ -62,11 +60,15 @@ $ACLOCAL \ read next if test -z "$next"; then Exit 1 + else + : # for shells with broken 'set -e' fi break fi done) < foo/Makefile.in || Exit 1 -cd build \ - && ../configure \ - && $MAKE distcheck || Exit 1 +cd build +../configure +$MAKE distcheck + +: diff --git a/tests/pr9.test b/tests/pr9.test index 788fd64..4638b52 100755 --- a/tests/pr9.test +++ b/tests/pr9.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 @@ -26,25 +26,38 @@ required=gzip . ./defs || Exit 1 -cat > configure.in << 'END' -AC_INIT(Makefile.am) -AC_CONFIG_AUX_DIR(support) -AM_INIT_AUTOMAKE(pr9, 0) -AC_OUTPUT(Makefile) +set -e + +cat > configure.in << END +AC_INIT([$me], [1.0]) +AC_CONFIG_AUX_DIR([support]) +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT END : > Makefile.am mkdir support -$ACLOCAL || Exit 1 +$ACLOCAL + +$AUTOCONF +$AUTOMAKE -a -c +./configure +$MAKE +$MAKE distcheck + +distdir=$me-1.0 + +gzip -d $distdir.tar.gz -$AUTOCONF || Exit 1 -$AUTOMAKE -a -c || Exit 1 -./configure || Exit 1 -$MAKE || Exit 1 -$MAKE distcheck || Exit 1 +tar tf $distdir.tar | $FGREP support -gunzip pr9-0.tar.gz || Exit 1 +tar xf $distdir.tar +ls -l . $distdir # for debugging +test -d $distdir/support +ls -l $distdir/support # for debugging +test -f $distdir/support/install-sh -tar tf pr9-0.tar | $FGREP support +: -- 1.7.1
From 442f0cd080af120582c7dfcb9a6fa6ca42a98c22 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Tue, 10 Aug 2010 18:56:38 +0200 Subject: [PATCH 3/3] Tweak and extend tests `pr[!0-9]*.test'. * tests/primary3.test: Add trailing `:' command. * tests/primary.test: Make grepping of Automake's stderr stricter. Also, add trailing `:' command, and cosmetic changes in spacing. * tests/primary2.test: Likewise. * tests/prefix.test: Enable `errexit' shell flags, and related changes. Add a trailing `:' command. * tests/proginst.test: Likewise. --- ChangeLog | 9 +++++++++ tests/prefix.test | 8 ++++++-- tests/primary.test | 8 ++++++-- tests/primary2.test | 7 +++++-- tests/primary3.test | 4 +++- tests/proginst.test | 9 +++++++-- 6 files changed, 36 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0b010e..e7f3db8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2010-08-09 Stefano Lattarini <stefano.lattar...@gmail.com> + Tweak and extend tests `pr[!0-9]*.test'. + * tests/primary3.test: Add trailing `:' command. + * tests/primary.test: Make grepping of Automake's stderr stricter. + Also, add trailing `:' command, and cosmetic changes in spacing. + * tests/primary2.test: Likewise. + * tests/prefix.test: Enable `errexit' shell flags, and related + changes. Add a trailing `:' command. + * tests/proginst.test: Likewise. + Modernize, improve and extend tests for PR (`pr[0-9]*.test'). * tests/pr2.test: Add trailing `:' command. * tests/pr229.test: Likewise. diff --git a/tests/prefix.test b/tests/prefix.test index 8199bd4..8ba92ef 100755 --- a/tests/prefix.test +++ b/tests/prefix.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,5 +29,7 @@ bnidir = $(prefix)/bni bni_PROGRAMS = zardoz EOF -$ACLOCAL || Exit 1 +$ACLOCAL $AUTOMAKE + +: diff --git a/tests/primary.test b/tests/primary.test index ac5e54f..a866f8f 100755 --- a/tests/primary.test +++ b/tests/primary.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 1996, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 1996, 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 @@ -26,4 +27,7 @@ END $ACLOCAL AUTOMAKE_fails -grep 'EXTRA_PROGRAMS' stderr +grep 'bin_PROGRAMS.*configure substitution' stderr +grep 'EXTRA_PROGRAMS.*not defined' stderr + +: diff --git a/tests/primary2.test b/tests/primary2.test index faa7aed..2fb3a60 100755 --- a/tests/primary2.test +++ b/tests/primary2.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 1996, 1997, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 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 @@ -29,4 +30,6 @@ END $ACLOCAL AUTOMAKE_fails -grep EXTRA_PROGRAMS stderr +grep 'EXTRA_PROGRAMS.*configure substitution' stderr + +: diff --git a/tests/primary3.test b/tests/primary3.test index 578d053..afccd0c 100755 --- a/tests/primary3.test +++ b/tests/primary3.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -38,3 +38,5 @@ $AUTOCONF $AUTOMAKE ./configure $MAKE + +: diff --git a/tests/proginst.test b/tests/proginst.test index 8881b9d..31745b7 100755 --- a/tests/proginst.test +++ b/tests/proginst.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 1996, 1998, 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 1996, 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,9 +20,13 @@ . ./defs || Exit 1 +set -e + cat > Makefile.am << 'END' bin_SCRIPTS = zardoz qbert brownie END -$ACLOCAL || Exit 1 +$ACLOCAL $AUTOMAKE + +: -- 1.7.1