Modernize, improve and extend tests `pr*.test'. * tests/pr2.test: Add trailing `:' command. * tests/pr229.test: Likewise. * tests/pr401.test: Likewise. * tests/pr401b.test: Likewise. * tests/pr401c.test: Likewise. * tests/primary3.test: Likewise. * tests/pr211.test: Likewise. 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/primary2.test: Likewise. * tests/primary.test: Likewise. * 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/prefix.test: Enable `errexit' shell flags, and related changes. Add a trailing `:' command. * tests/proginst.test: Likewise. * tests/pr87.test: Likewise. Also, 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/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. * 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/pr300-prog.test: Cosmetic changes to spacing, and add a trailing `:' command. * tests/pr300-lib.test: Likewise. * tests/pr300-ltlib.test: Likewise, and ensure verbose printing of captured make stdout. * tests/pr307.test: Move setting of `errexit' shell flag earlier in the script (just after inclusion of ./defs). Prefer fgrep over grep where possible, and escape literal dots in grep regular expressions. Also, add a trailing `:' command, and cosmetic changes to spacing. --- ChangeLog | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 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 | 27 +++++++++++++--------- 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 | 15 +++++++----- tests/pr401.test | 4 ++- tests/pr401b.test | 4 ++- tests/pr401c.test | 4 ++- tests/pr72.test | 12 ++++++--- tests/pr87.test | 26 +++++++++++---------- tests/pr9.test | 41 ++++++++++++++++++++++----------- tests/prefix.test | 8 +++++- tests/primary.test | 8 +++++- tests/primary2.test | 7 ++++- tests/primary3.test | 4 ++- tests/proginst.test | 9 +++++- 27 files changed, 256 insertions(+), 122 deletions(-)
From 5aab0b3b33c6deafef2c0dbe87fc8da6357db120 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] Modernize, improve and extend tests `pr*.test'.
* tests/pr2.test: Add trailing `:' command. * tests/pr229.test: Likewise. * tests/pr401.test: Likewise. * tests/pr401b.test: Likewise. * tests/pr401c.test: Likewise. * tests/primary3.test: Likewise. * tests/pr211.test: Likewise. 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/primary2.test: Likewise. * tests/primary.test: Likewise. * 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/prefix.test: Enable `errexit' shell flags, and related changes. Add a trailing `:' command. * tests/proginst.test: Likewise. * tests/pr87.test: Likewise. Also, 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/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. * 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/pr300-prog.test: Cosmetic changes to spacing, and add a trailing `:' command. * tests/pr300-lib.test: Likewise. * tests/pr300-ltlib.test: Likewise, and ensure verbose printing of captured make stdout. * tests/pr307.test: Move setting of `errexit' shell flag earlier in the script (just after inclusion of ./defs). Prefer fgrep over grep where possible, and escape literal dots in grep regular expressions. Also, add a trailing `:' command, and cosmetic changes to spacing. --- ChangeLog | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 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 | 27 +++++++++++++--------- 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 | 15 +++++++----- tests/pr401.test | 4 ++- tests/pr401b.test | 4 ++- tests/pr401c.test | 4 ++- tests/pr72.test | 12 ++++++--- tests/pr87.test | 26 +++++++++++---------- tests/pr9.test | 41 ++++++++++++++++++++++----------- tests/prefix.test | 8 +++++- tests/primary.test | 8 +++++- tests/primary2.test | 7 ++++- tests/primary3.test | 4 ++- tests/proginst.test | 9 +++++- 27 files changed, 256 insertions(+), 122 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4366381..d5ce19b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,61 @@ +2010-07-14 Stefano Lattarini <stefano.lattar...@gmail.com> + + Modernize, improve and extend tests `pr*.test'. + * tests/pr2.test: Add trailing `:' command. + * tests/pr229.test: Likewise. + * tests/pr401.test: Likewise. + * tests/pr401b.test: Likewise. + * tests/pr401c.test: Likewise. + * tests/primary3.test: Likewise. + * tests/pr211.test: Likewise. 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/primary2.test: Likewise. + * tests/primary.test: Likewise. + * 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/prefix.test: Enable `errexit' shell flags, and related + changes. Add a trailing `:' command. + * tests/proginst.test: Likewise. + * tests/pr87.test: Likewise. Also, 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/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. + * 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/pr300-prog.test: Cosmetic changes to spacing, and add a + trailing `:' command. + * tests/pr300-lib.test: Likewise. + * tests/pr300-ltlib.test: Likewise, and ensure verbose printing + of captured make stdout. + * tests/pr307.test: Move setting of `errexit' shell flag earlier + in the script (just after inclusion of ./defs). Prefer fgrep + over grep where possible, and escape literal dots in grep regular + expressions. Also, add a trailing `:' command, and cosmetic + changes to spacing. + 2010-06-26 Ralf Wildenhues <ralf.wildenh...@gmx.de> Update program --help output to match current GCS. diff --git a/tests/pr2.test b/tests/pr2.test index 258a8ef..fac53a5 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 @@ -38,3 +38,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 9344fd2..862370d 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 @@ -21,12 +21,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' @@ -40,3 +38,5 @@ libtoolize $ACLOCAL AUTOMAKE_fails -a $FGREP 'foo.$(OBJEXT)' stderr + +: diff --git a/tests/pr220.test b/tests/pr220.test index 25e1f0e..7b39a1d 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 @@ -21,7 +22,7 @@ required=gcc set -e -cat >main.c <<EOF +cat > main.c <<'EOF' int main() { return 0; } EOF @@ -57,4 +58,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' + +: diff --git a/tests/pr224.test b/tests/pr224.test index fdcb997..4b00a15 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 @@ -19,6 +19,8 @@ required=gcc . ./defs || Exit 1 +set -e + mkdir foo cat >foo/main.c <<'EOF' @@ -31,30 +33,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 a97ef4f..69db5f5 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 @@ -29,5 +29,8 @@ EOF $ACLOCAL $AUTOMAKE -a + test -f config.sub test -f config.guess + +: diff --git a/tests/pr243.test b/tests/pr243.test index a5e869e..0a0b51f 100755 --- a/tests/pr243.test +++ b/tests/pr243.test @@ -18,27 +18,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 a1cd2fe..916d6e9 100755 --- a/tests/pr266.test +++ b/tests/pr266.test @@ -18,25 +18,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 +$ACLOCAL +$AUTOMAKE +$AUTOCONF +# FIXME: require compiler in $required rather than skipping here ./configure || Exit $? test -f .deps/fx64.Po + +: diff --git a/tests/pr279-2.test b/tests/pr279-2.test index 286e33a..0f76831 100755 --- a/tests/pr279-2.test +++ b/tests/pr279-2.test @@ -18,12 +18,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 @@ -37,8 +36,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 50dff53..668a203 100755 --- a/tests/pr279.test +++ b/tests/pr279.test @@ -18,12 +18,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 @@ -39,5 +38,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 0091415..1a8fe2d 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 @@ -21,6 +21,8 @@ required='libtoolize gcc' . ./defs || Exit 1 +set -e + cat >> configure.in << 'END' AC_PROG_CC AC_PROG_LIBTOOL @@ -34,8 +36,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 @@ -49,8 +51,6 @@ int $i() { return 0; } EOF done -set -e - libtoolize --force $ACLOCAL $AUTOCONF @@ -58,9 +58,10 @@ $AUTOMAKE -a # Sanity check: make sure the variable we are attempting to force # is used by configure -grep am_cv_CC_dependencies_compiler_type configure +$FGREP am_cv_CC_dependencies_compiler_type configure ./configure am_cv_CC_dependencies_compiler_type=dashmstdout + $MAKE test -f librace.la && Exit 1 $MAKE check @@ -75,3 +76,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 d67c17b..50fd23c 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 @@ -18,6 +18,8 @@ required=libtool . ./defs || Exit 1 +set -e + cat >> configure.in << 'END' AC_PROG_CC AC_PROG_LIBTOOL @@ -34,7 +36,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 369849b..f333ae8 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 @@ -19,6 +19,8 @@ required=gcc . ./defs || Exit 1 +set -e + subdirs="foo bar" for i in $subdirs; do @@ -36,7 +38,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 @@ -45,15 +47,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 @@ -61,11 +59,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 dab9734..4657811 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 @@ -19,25 +19,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 +: 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