summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rwxr-xr-xtests/acloca14.test4
-rwxr-xr-xtests/acloca17.test6
-rwxr-xr-xtests/acloca18.test4
-rwxr-xr-xtests/aclocal.test8
-rwxr-xr-xtests/acsilent.test4
-rwxr-xr-xtests/alpha.test6
-rwxr-xr-xtests/check4.test4
-rwxr-xr-xtests/color.test4
-rwxr-xr-xtests/fn99.test6
-rwxr-xr-xtests/fn99subdir.test6
-rwxr-xr-xtests/help.test4
-rwxr-xr-xtests/init.test6
-rwxr-xr-xtests/lisp8.test4
-rwxr-xr-xtests/missing3.test14
-rwxr-xr-xtests/pr220.test6
-rwxr-xr-xtests/python11.test8
-rwxr-xr-xtests/python4.test6
-rwxr-xr-xtests/python5.test6
-rwxr-xr-xtests/unused.test6
-rwxr-xr-xtests/version8.test5
21 files changed, 70 insertions, 58 deletions
diff --git a/ChangeLog b/ChangeLog
index 55614d05e..04030550c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2008-10-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Print captured output before failing.
+ * tests/acloca14.test, tests/acloca17.test, tests/acloca18.test,
+ tests/aclocal.test, tests/acsilent.test, tests/alpha.test,
+ tests/check4.test, tests/color.test, tests/fn99.test,
+ tests/fn99subdir.test, tests/help.test, tests/init.test,
+ tests/lisp8.test, tests/missing3.test, tests/pr220.test,
+ tests/python11.test, tests/python4.test, tests/python5.test,
+ tests/unused.test, tests/version8.test: When Exit is called
+ after a command that has stdout or stderr redirected to a file
+ for later inspection, output the file before failing the test.
+
Fix some comment typos.
* automake.in: Fix some comment typos.
* lib/Automake/Condition.pm: Likewise.
diff --git a/tests/acloca14.test b/tests/acloca14.test
index 4042d0ef8..c07afa616 100755
--- a/tests/acloca14.test
+++ b/tests/acloca14.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008 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
@@ -108,5 +108,5 @@ $MAKE testdist2
# Make sure aclocal diagnose missing included files with correct `file:line:'.
rm -f b.m4
-$ACLOCAL 2>stderr && Exit 1
+$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
grep 'a.m4:1:.*b.m4.*does not exist' stderr
diff --git a/tests/acloca17.test b/tests/acloca17.test
index d60a5a0c3..196d20b35 100755
--- a/tests/acloca17.test
+++ b/tests/acloca17.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008 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
@@ -34,6 +34,6 @@ EOF
# FIXME: We want autom4te's 'undefined required macro' warning to be fatal,
# but have no means to say so to aclocal. We use WARNINGS=error instead.
-WARNINGS=error $ACLOCAL -I m4 2>stderr && Exit 1
-cat stderr
+WARNINGS=error $ACLOCAL -I m4 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
grep 'configure.in:4:.*UNDEFINED_MACRO' stderr
diff --git a/tests/acloca18.test b/tests/acloca18.test
index f0bfd571a..be827e3d1 100755
--- a/tests/acloca18.test
+++ b/tests/acloca18.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2008 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
@@ -86,7 +86,7 @@ grep macro23 foo
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
rm -f foo
-$ACLOCAL --install 2>stderr && Exit 1
+$ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
grep AM_MACRO2 stderr
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
diff --git a/tests/aclocal.test b/tests/aclocal.test
index 4431779a7..a894d984e 100755
--- a/tests/aclocal.test
+++ b/tests/aclocal.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2004, 2008 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
@@ -23,15 +23,15 @@ set -e
$ACLOCAL --output=fred
test -f fred
-$ACLOCAL --output 2>stderr && Exit 1
+$ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; }
grep 'option.*--output.*an argument' stderr
grep help stderr
-$ACLOCAL --unknown-option 2>stderr && Exit 1
+$ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; }
grep 'unrecognized.*--unknown-option' stderr
grep help stderr
-$ACLOCAL --ver 2>stderr && Exit 1
+$ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
grep 'unrecognized.*--ver' stderr
grep help stderr
diff --git a/tests/acsilent.test b/tests/acsilent.test
index c1fb4cd0c..04438fd12 100755
--- a/tests/acsilent.test
+++ b/tests/acsilent.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2008 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,5 +32,5 @@ module=[$1]
AC_SUBST(module)])
END
-$ACLOCAL > output 2>&1 || Exit 1
+$ACLOCAL > output 2>&1 || { cat output; Exit 1; }
test -z "`cat output`"
diff --git a/tests/alpha.test b/tests/alpha.test
index ba17d74b2..9994d9d66 100755
--- a/tests/alpha.test
+++ b/tests/alpha.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2008 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
@@ -62,8 +62,8 @@ $AUTOMAKE
./configure
# make distdir should fail because NEWS does not mention 1.0a
-$MAKE check 2>stderr && Exit 1
-cat stderr
+$MAKE check 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
grep 'NEWS not updated' stderr
test ! -f works
diff --git a/tests/check4.test b/tests/check4.test
index fce92192c..ac367ca22 100755
--- a/tests/check4.test
+++ b/tests/check4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007, 2008 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
@@ -50,7 +50,7 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE
./configure --prefix "`pwd`/inst"
-$MAKE check >stdout && Exit 1
+$MAKE check >stdout && { cat stdout; Exit 1; }
cat stdout
grep 'FAIL: fail.sh' stdout
grep 'PASS: ok.sh' stdout && Exit 1
diff --git a/tests/color.test b/tests/color.test
index 5a02e8d19..cd668454b 100755
--- a/tests/color.test
+++ b/tests/color.test
@@ -105,11 +105,11 @@ AM_COLOR_TESTS=always $MAKE -e check >stdout && { cat stdout; Exit 1; }
cat stdout
test_color
-MAKE=$MAKE expect -f expect-make >stdout || Exit 77
+MAKE=$MAKE expect -f expect-make >stdout || { cat stdout; Exit 77; }
cat stdout
test_color
-AM_COLOR_TESTS=no MAKE=$MAKE expect -f expect-make >stdout || Exit 77
+AM_COLOR_TESTS=no MAKE=$MAKE expect -f expect-make >stdout || { cat stdout; Exit 77; }
cat stdout
test_no_color
:
diff --git a/tests/fn99.test b/tests/fn99.test
index a23b169f9..31ee1b511 100755
--- a/tests/fn99.test
+++ b/tests/fn99.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008 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
@@ -47,8 +47,8 @@ do
touch x
done) || Exit 77
-$MAKE dist 2>stderr && Exit 1
-cat stderr
+$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
grep 'filenames are too long' stderr
test 2 = `grep 12345678 stderr | wc -l`
:
diff --git a/tests/fn99subdir.test b/tests/fn99subdir.test
index e7b16c103..f0a792863 100755
--- a/tests/fn99subdir.test
+++ b/tests/fn99subdir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008 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
@@ -73,8 +73,8 @@ do
touch x
done)
-$MAKE dist 2>stderr && Exit 1
-cat stderr
+$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
grep 'filenames are too long' stderr
test 1 = `grep 12345678 stderr | wc -l`
:
diff --git a/tests/help.test b/tests/help.test
index 82f73dd98..030624f77 100755
--- a/tests/help.test
+++ b/tests/help.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2008 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,7 +32,7 @@ $AUTOMAKE --version
$AUTOMAKE --help
# aclocal and automake cannot work without configure.ac or configure.in
-$ACLOCAL 2>stderr && Exit 1
+$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
grep configure.ac stderr
grep configure.in stderr
AUTOMAKE_fails
diff --git a/tests/init.test b/tests/init.test
index 914a221c8..8eaf581e0 100755
--- a/tests/init.test
+++ b/tests/init.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008 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 +27,7 @@ AM_INIT_AUTOMAKE
END
# The error message should mension AC_INIT, not AC_PACKAGE_VERSION.
-($ACLOCAL && $AUTOCONF) 2>stderr && Exit 1
-cat stderr
+($ACLOCAL && $AUTOCONF) 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
grep AC_PACKAGE_VERSION stderr && Exit 1
grep AC_INIT stderr
diff --git a/tests/lisp8.test b/tests/lisp8.test
index fe6a7142c..578cd9c26 100755
--- a/tests/lisp8.test
+++ b/tests/lisp8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2008 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
@@ -39,7 +39,7 @@ $AUTOCONF
$AUTOMAKE --add-missing
./configure
-$MAKE -j >stdout
+$MAKE -j >stdout || { cat stdout; Exit 1; }
cat stdout
test 1 -eq `grep 'Warnings can be ignored' stdout | wc -l`
diff --git a/tests/missing3.test b/tests/missing3.test
index 9d6a57478..c9173634e 100755
--- a/tests/missing3.test
+++ b/tests/missing3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008 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,24 +22,24 @@ set -e
# b7cb8259 assumed not to exist.
-./missing b7cb8259 --version 2>stderr && Exit 1
+./missing b7cb8259 --version 2>stderr && { cat stderr >&2; Exit 1; }
grep . stderr && Exit 1
-./missing b7cb8259 --grep 2>stderr && Exit 1
+./missing b7cb8259 --grep 2>stderr && { cat stderr >&2; Exit 1; }
grep WARNING stderr
./missing --run b7cb8259 --version && Exit 1
-./missing --run b7cb8259 --grep 2>stderr && Exit 1
+./missing --run b7cb8259 --grep 2>stderr && { cat stderr >&2; Exit 1; }
grep WARNING stderr
# missing itself it known to exist :)
-./missing ./missing --version 2>stderr && Exit 1
+./missing ./missing --version 2>stderr && { cat stderr >&2; Exit 1; }
grep . stderr && Exit 1
-./missing ./missing --grep 2>stderr && Exit 1
+./missing ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
grep WARNING stderr
./missing --run ./missing --version 2>stderr
grep . stderr && Exit 1
-./missing --run ./missing --grep 2>stderr && Exit 1
+./missing --run ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
grep WARNING stderr && Exit 1
grep Unknown stderr
diff --git a/tests/pr220.test b/tests/pr220.test
index 137436766..2401e5972 100755
--- a/tests/pr220.test
+++ b/tests/pr220.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2008 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
@@ -55,6 +55,6 @@ $AUTOMAKE -a
cd build
# configure should fail since we've done something invalid.
-../configure 2>stderr && Exit 1
-cat stderr
+../configure 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
grep NEVER_TRUE stderr
diff --git a/tests/python11.test b/tests/python11.test
index fb0eeb6f2..b95e31b3f 100755
--- a/tests/python11.test
+++ b/tests/python11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2008 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,9 +35,9 @@ EOF
$ACLOCAL
$AUTOCONF
-./configure >stdout 2>stderr && Exit 1
+./configure >stdout 2>stderr && { cat stdout; cat stderr >&2; Exit 1; }
cat stdout
-cat stderr
+cat stderr >&2
grep 'checking for IShouldNotExist1' stdout
grep 'checking for IShouldNotExist2' stdout
grep 'no suitable Python interpreter found' stderr
@@ -50,6 +50,6 @@ $AUTOCONF
./configure
# Any user setting should be used.
-./configure PYTHON=foo >stdout && Exit 1
+./configure PYTHON=foo >stdout && { cat stdout; Exit 1; }
cat stdout
grep 'PYTHON = foo' stdout
diff --git a/tests/python4.test b/tests/python4.test
index 3fad96ab6..770bf5095 100755
--- a/tests/python4.test
+++ b/tests/python4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2008 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
@@ -33,6 +33,6 @@ $AUTOCONF
$AUTOMAKE --add-missing
# Simulate no Python
-./configure PYTHON=: 2>stderr && Exit 1
-cat stderr
+./configure PYTHON=: 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
grep 'no suitable Python interpreter found' stderr
diff --git a/tests/python5.test b/tests/python5.test
index 6f789152f..af7937729 100755
--- a/tests/python5.test
+++ b/tests/python5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2008 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
@@ -34,6 +34,6 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-./configure 2>stderr && Exit 1
-cat stderr
+./configure 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
grep 'no suitable Python interpreter found' stderr
diff --git a/tests/unused.test b/tests/unused.test
index 45ca4854c..6d1f76487 100755
--- a/tests/unused.test
+++ b/tests/unused.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2002, 2003, 2008 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,5 @@ AC_DEFUN([MACRO_1_2], echo 12)
AC_DEFUN([MACRO_1_2_3], echo 123)
END
-$ACLOCAL 2> output || Exit 1
-test -z "`cat output`"
+$ACLOCAL 2> stderr || { cat stderr >&2; Exit 1; }
+test -z "`cat stderr`"
diff --git a/tests/version8.test b/tests/version8.test
index de61cf18e..250ec17ee 100755
--- a/tests/version8.test
+++ b/tests/version8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2008 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,5 +20,6 @@
set -e
echo 'AM_AUTOMAKE_VERSION([1.9])' >>configure.in
-$ACLOCAL 2>stderr && Exit 0
+$ACLOCAL 2>stderr && { cat stderr >&2; Exit 0; }
+cat stderr >&2
$FGREP 'AM_INIT_AUTOMAKE([1.9])' stderr