# version.good should depend on version.gin.
rm -f version.good
- $MAKE version.good >output 2>&1 && { cat output; Exit 1; }
- cat output
+ $MAKE version.good 2>stderr && { cat stderr >&2; Exit 1; }
+ cat stderr >&2
# Try to verify that we errored out for the right reason.
- $FGREP version.gin output
+ $FGREP version.gin stderr
cd .. # Back in top builddir.
cd $srcdir
$MAKE
rm -f zardoz.am
-$MAKE >output 2>&1 && { cat output; Exit 1; }
-cat output
+$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
# This error will come from automake, not make, so we can be stricter
# in our grepping of it.
-grep 'cannot open.*zardoz\.am' output
-grep 'foobar\.am' output && Exit 1 # No spurious error, please.
+grep 'cannot open.*zardoz\.am' stderr
+grep 'foobar\.am' stderr && Exit 1 # No spurious error, please.
# Try with one less indirection.
: > foobar.am
./config.status Makefile
$MAKE # Sanity check.
rm -f foobar.am
-$MAKE >output 2>&1 && { cat output; Exit 1; }
-cat output
+$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
# This error will come from automake, not make, so we can be stricter
# in our grepping of it.
-grep 'cannot open.*foobar\.am' output
+grep 'cannot open.*foobar\.am' stderr
:
$MAKE
rm -f zardoz.m4
-$MAKE >output 2>&1 && { cat output; Exit 1; }
-cat output
+$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
# This error will come from aclocal, not make, so we can be stricter
# in our grepping of it.
-grep ' foobar\.m4:1:.*zardoz\.m4.*does not exist' output
+grep ' foobar\.m4:1:.*zardoz\.m4.*does not exist' stderr
# No spurious errors, please.
-$FGREP -v ' foobar.m4:1:' output | $FGREP 'foobar.m4' && Exit 1
+$FGREP -v ' foobar.m4:1:' stderr | $FGREP 'foobar.m4' && Exit 1
# Try with one less indirection.
: > foobar.m4
./configure
$MAKE # Sanity check.
rm -f foobar.m4
-$MAKE >output 2>&1 && { cat output; Exit 1; }
-cat output
+$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
# This error will come from aclocal, not make, so we can be stricter
# in our grepping of it.
-grep 'foobar\.m4.*does not exist' output
+grep 'foobar\.m4.*does not exist' stderr
# No spurious errors, please (ok, this is really paranoid).
-$FGREP 'zardoz.m4' output && Exit 1
+$FGREP 'zardoz.m4' stderr && Exit 1
:
cd $distdir
./configure
fi
- $MAKE >output 2>&1 && { cat output; Exit 1; }
- cat output
+ $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
+ cat stderr >&2
# This error comes from automake, not make, so we can be stricter
# in our grepping of it.
- grep 'cannot open.*zardoz\.am' output
- grep 'foobar\.am' output && Exit 1 # No spurious error, please.
+ grep 'cannot open.*zardoz\.am' stderr
+ grep 'foobar\.am' stderr && Exit 1 # No spurious error, please.
cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
done
cd $distdir
./configure
fi
- $MAKE >output 2>&1 && { cat output; Exit 1; }
- cat output
+ $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
+ cat stderr
# This error will come from automake, not make, so we can be stricter
# in our grepping of it.
- grep 'zardoz\.m4.*does not exist' output
- grep 'foobar\.m4' output && Exit 1 # No spurious error, please.
+ grep 'zardoz\.m4.*does not exist' stderr
+ grep 'foobar\.m4' stderr && Exit 1 # No spurious error, please.
cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
done
cd $distdir
./configure
fi
- $MAKE >output 2>&1 && { cat output; Exit 1; }
- cat output
+ $MAKE 2>stderr && { cat stderr; Exit 1; }
+ cat stderr
# This error will come from autoconf, not make, so we can be stricter
# in our grepping of it.
- grep 'possibly undefined .*MY_ZARDOZ' output
- grep 'MY_FOOBAR' output && Exit 1 # No spurious error, please.
+ grep 'possibly undefined .*MY_ZARDOZ' stderr
+ grep 'MY_FOOBAR' stderr && Exit 1 # No spurious error, please.
cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
done
$AUTOMAKE Makefile
./config.status Makefile
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
-grep "^configure:.* success='no', sentence='it works :-)'" output
+$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep "^configure:.* success='no', sentence='it works :-)'" stderr
$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes"
# ... but not when "make distcheck" is run from the subpackage.
cd subpkg
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
-grep '^configure:.* dc=KO am_dc=KO' output
+$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep '^configure:.* dc=KO am_dc=KO' stderr
:
DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes sentence='it works :-)'"
# Sanity check.
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
-grep "^configure:.* success='no', sentence=''" output
+$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep "^configure:.* success='no', sentence=''" stderr
:
./configure
# We can build the distribution.
-$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
-cat output
+$MAKE distcheck 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
# Sanity check: verify that our code has hit a problem removing
# the distdir, but has recovered from it.
-grep "rm:.*$destdir" output || fatal_ "expected code path not covered"
+grep "rm:.*$destdir" stderr || fatal_ "expected code path not covered"
:
test -f inst/share/dir
rm -rf inst
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
+$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
-$FGREP 'ERROR: files left after uninstall:' output
-grep '/share/dir *$' output
+grep 'ERROR: files left after uninstall:' stderr
+grep '/share/dir *$' stderr
# A few trickier corner cases.
test -f inst/share/info/more/dir
rm -rf inst
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
+$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
-$FGREP 'ERROR: files left after uninstall:' output
-grep '/mu/share/info/dir *$' output
-grep '/share/info/more/dir *$' output
+grep 'ERROR: files left after uninstall:' stderr
+grep '/mu/share/info/dir *$' stderr
+grep '/share/info/more/dir *$' stderr
:
unique=0a3346e2af8a689b85002b53df09142a
$sleep
echo "(message \"$unique\")(provide 'am-three)" > am-three.el
-$MAKE >output 2>&1 || { cat output; Exit 1; }
-cat output
-grep $unique output
+$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep $unique stderr
# It should also work for VPATH-builds.
$MAKE distcheck
./configure
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
-cat output
+$MAKE check >stdout 2>stderr && { cat stdout; cat stderr >&2; Exit 1; }
+cat stdout; cat stderr >&2
test -f ok.log
-grep '^PASS: ok\.test' output
-$FGREP 'zardoz.log' output
+grep '^PASS: ok\.test' stdout
+$FGREP 'zardoz.log' stderr
test ! -f test-suite.log
-$MAKE TESTS='zardoz2.test' check >output 2>&1 && { cat output; Exit 1; }
-cat output
-$FGREP 'zardoz2.log' output
+$MAKE TESTS='zardoz2.test' check 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr
+$FGREP 'zardoz2.log' stderr
test ! -f test-suite.log
-$MAKE TEST_LOGS='zardoz3.log' check >output 2>&1 && { cat output; Exit 1; }
-cat output
-$FGREP 'zardoz3.log' output
+$MAKE TEST_LOGS='zardoz3.log' check 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$FGREP 'zardoz3.log' stderr
test ! -f test-suite.log
# The errors should persist even after 'test-suite.log'
$MAKE check
rm -f zardoz.test
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
-cat output
-$FGREP 'zardoz.log' output
+$MAKE check 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$FGREP 'zardoz.log' stderr
test ! -f test-suite.log
:
test ! -f foobar2.log || Exit 99
test ! -f foobar2.trs || Exit 99
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
-cat output
-grep 'test-suite\.log.*foobar1\.log' output
-grep 'test-suite\.log.*foobar1\.trs' output
-grep 'test-suite\.log.*foobar2\.log' output
-grep 'test-suite\.log.*foobar2\.trs' output
+$MAKE check 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'test-suite\.log.*foobar1\.log' stderr
+grep 'test-suite\.log.*foobar1\.trs' stderr
+grep 'test-suite\.log.*foobar2\.log' stderr
+grep 'test-suite\.log.*foobar2\.trs' stderr
test ! -f test-suite.log
:
: > $inst/share/foobar.txt
chmod a-w $inst/share
-$MAKE uninstall >output 2>&1 && { cat output; Exit 1; }
-cat output
+$MAKE uninstall 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
if test $rm_f_is_silent_on_error = yes; then
: "rm -f" is silent on errors, skip the grepping of make output
else
- grep "rm: .*foobar\.txt" output
+ grep "rm: .*foobar\.txt" stderr >&2
fi
chmod a-rwx $inst/share
(cd $inst/share) && skip_ "cannot make directories fully unreadable"
-$MAKE uninstall >output 2>&1 && { cat output; Exit 1; }
-cat output
+$MAKE uninstall 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
#
# Some shells, like Solaris 10 /bin/sh and /bin/ksh, do not report
# the name of the 'cd' builtin upon a chdir error:
# > cd unreadable'
# /usr/xpg4/bin/sh[3]: unreadable: permission denied
#
-$EGREP "(cd|sh)(\[[0-9]*[0-9]\])?: .*$inst/share" output
+$EGREP "(cd|sh)(\[[0-9]*[0-9]\])?: .*$inst/share" stderr
:
mkdir build2
cd build2
../$distdir/configure
-$MAKE >out 2>&1 && { cat out; Exit 1; }
-cat out
-$FGREP parse.c out
+$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$FGREP parse.c stderr
: