From e3c82b94ea7dbfef8ec6eb7a689a77a8a6cd7e1f Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 6 Jun 2010 17:02:56 +0200 Subject: [PATCH] Prefer AUTOMAKE_fails over `$AUTOMAKE | grep' in tests. * tests/ldadd.test: Enable errexit. Use AUTOMAKE_fails so the verbose log contains all output. * tests/mdate.test: Likewise. Prompted by Stefano Lattarini's change to discover.test. Signed-off-by: Ralf Wildenhues --- ChangeLog | 8 ++++++++ tests/ldadd.test | 8 ++++++-- tests/mdate.test | 8 ++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a42f6f5..45fddf4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-06-06 Ralf Wildenhues + + Prefer AUTOMAKE_fails over `$AUTOMAKE | grep' in tests. + * tests/ldadd.test: Enable errexit. Use AUTOMAKE_fails so + the verbose log contains all output. + * tests/mdate.test: Likewise. + Prompted by Stefano Lattarini's change to discover.test. + 2010-06-06 Stefano Lattarini Improve tests link*.test (enable `errexit' shell flag). diff --git a/tests/ldadd.test b/tests/ldadd.test index 005f9d8..7f4fce8 100755 --- a/tests/ldadd.test +++ b/tests/ldadd.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 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 +20,8 @@ required=libtool . ./defs || Exit 1 +set -e + cat >> configure.in << 'END' AC_PROG_CC AC_PROG_LIBTOOL @@ -39,5 +42,6 @@ END : > q.c $ACLOCAL || Exit 1 -$AUTOMAKE 2>&1 | grep LDADD || Exit 1 +AUTOMAKE_fails +grep LDADD stderr || Exit 1 Exit 0 diff --git a/tests/mdate.test b/tests/mdate.test index 704b393..92a736f 100755 --- a/tests/mdate.test +++ b/tests/mdate.test @@ -1,5 +1,6 @@ #!/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 @@ -18,6 +19,8 @@ . ./defs || Exit 1 +set -e + cat > Makefile.am << 'END' info_TEXINFOS = textutils.texi END @@ -31,4 +34,5 @@ END : > texinfo.tex $ACLOCAL || Exit 1 -$AUTOMAKE 2>&1 > /dev/null | grep 'required file.*mdate-sh' +AUTOMAKE_fails +grep 'required file.*mdate-sh' stderr -- 2.7.4