summaryrefslogtreecommitdiff
path: root/tests/gnits3.test
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2011-01-02 15:49:16 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-01-03 14:47:47 +0100
commita7d14dfbd4bbf58e03b007cea9e97d1c47f17c7c (patch)
treef7342a01573bbf8011efd62c0d07f68b7a123dab /tests/gnits3.test
parentb9ab6dd38be370a76db85c32e0c0ab9e7189eed6 (diff)
downloadautomake-a7d14dfbd4bbf58e03b007cea9e97d1c47f17c7c.tar.gz
Tests: normalize use of the 'errexit' shell flag.
* tests/maken3.test (check_targets): Remove redundant call to 'set -e'. * tests/maken4.test: Likewise. * tests/ansi5.test: Call 'set -e' just after './defs' has been sourced. * tests/ansi6.test: Likewise. * tests/ansi7.test: Likewise. * tests/cond16.test: Likewise. * tests/cond17.test: Likewise. * tests/cond18.test: Likewise. * tests/cond19.test: Likewise. * tests/cond20.test: Likewise. * tests/cond21.test: Likewise. * tests/instdat2.test: Likewise. * tests/instdir-texi.test: Likewise. * tests/parallel-tests3.test: Likewise. * tests/remake1a.test: Likewise. * tests/ccnoco.test: Likewise, and add trailing `:' command. * tests/comment4.test: Likewise. * tests/gcj4.test: Likewise. * tests/nodist2.test: Likewise. * tests/nodist3.test: Enable 'errexit' shell flag (this should have been done in commit v1.11-248-g317e17b, but the relevant hunk has been forgotten somehow). * tests/output.test: Likewise. * tests/gnits2.test: Likewise, and display captured stderr to script's stderr, not to script's stdout. * tests/gnits3.test: Likewise. Also, prefer 'cat' over 'echo' to append to Makefile.am, and really check that the exit status of "make installcheck" indicates failure.
Diffstat (limited to 'tests/gnits3.test')
-rwxr-xr-xtests/gnits3.test15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/gnits3.test b/tests/gnits3.test
index 7a08fb852..32246521b 100755
--- a/tests/gnits3.test
+++ b/tests/gnits3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2011 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
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_OUTPUT
@@ -70,8 +72,6 @@ chmod +x sub/nok.sh
: > ChangeLog
: > THANKS
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
@@ -83,14 +83,19 @@ cd build
../configure "--prefix=`pwd`/../inst-dir" --program-prefix=p
$MAKE
$MAKE install
+$MAKE installcheck && Exit 1
$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
-cat stderr
+cat stderr >&2
$MAKE grep-stderr
# Make sure there is no more error when all targets are exempted.
cd ..
-echo 'AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += sub/nok$(EXEEXT) sub/nok.sh' >> Makefile.am
+cat >> Makefile.am <<'END'
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += sub/nok$(EXEEXT) sub/nok.sh
+END
$AUTOMAKE
cd build
./config.status # Don't rely on the rebuild rules (they need GNU make).
$MAKE installcheck
+
+: