From 8192eeb514acf36f91756a0a0e594b0c22d71efb Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 8 May 2010 01:27:36 +0200 Subject: Modernize, improve and/or fix various test scripts. * tests/sanity.test: Rely on the `configure.in' stub created by `./defs', rather than writing one from scratch. * tests/depend2.test: Likewise. Also, call `set -e' just after the inclusion of `./defs', instead that later in the script. * tests/canon5.test: Avoid a useless `|| Exit 1' after a call to $AUTOMAKE, and improve the positioning of an $ACLOCAL call. * tests/exeext4.test: Use $FGREP instead of grep, where possible. Make auxiliary rules in the generated Makefile more silent. These changes make some checks slighty stricter. * tests/ext2.test: Call `Exit 1' if inclusion of `./defs' fails. * tests/gettext2.test: Place final `:' at the end of the script, rather than in the middle. * tests/exeext.test: Call `set -e' just after the inclusion of `./defs', instead that later in the script. * tests/extra5.test: Likewise. * tests/confdeps.test: Likewise. Also, prefer `mv -f' over plain `mv', just to be sure. * tests/depcomp.test: Enable `errexit' shell flag, with related changes. Also, modernize the generated configure.in. * tests/cond9.test: Likewise. Also, rely on the `configure.in' stub created by `./defs', rather than writing one from scratch. * tests/cond10.test: Likewise. * tests/depcomp2.test: Likewise. * tests/depend3.test: Likewise. * tests/distcom7.test: Likewise. * tests/fortdep.test: Likewise. Also, remove definition of AUTOMAKE_OPTIONS to `foreign' in the generated Makefile.am, since that flag is already provided by $AUTOMAKE. * tests/mdate.test: Made stricter, by checking that Automake actually failed, and by making a stricter grep on the error message. Also, set shell `errexit flag'. * tests/python2.test: Improved verbose messages. Signed-off-by: Ralf Wildenhues --- tests/fortdep.test | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'tests/fortdep.test') diff --git a/tests/fortdep.test b/tests/fortdep.test index 8e622984f..585e7c15a 100755 --- a/tests/fortdep.test +++ b/tests/fortdep.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,24 +19,23 @@ . ./defs || Exit 1 -cat > configure.in << 'END' -AC_INIT(foo, 1.0, martin@tropos.de) -AM_INIT_AUTOMAKE(foo, 1.0) -AC_CONFIG_SRCDIR(foo.f) +set -e + +cat >> configure.in << 'END' +AC_CONFIG_SRCDIR([foo.f]) AC_PROG_F77 -AC_OUTPUT(Makefile) +AC_OUTPUT END cat > Makefile.am << 'END' -AUTOMAKE_OPTIONS=foreign bin_PROGRAMS=foo foo_SOURCES=foo.f END : > foo.f -$ACLOCAL || Exit 1 -$AUTOMAKE || Exit 1 +$ACLOCAL +$AUTOMAKE grep 'foo\.Po' Makefile.in && Exit 1 Exit 0 -- cgit v1.2.1