diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-23 12:10:18 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-23 20:09:29 +0200 |
commit | 3ce4015f1bfff6277840502b080cfd2b22e05870 (patch) | |
tree | 11d32069669ef2dd551ff22ac022722bf37fb2e1 /t/color-tests2.sh | |
parent | e2a000cc181b4a66564b8378cad6843d1938f80a (diff) | |
download | automake-3ce4015f1bfff6277840502b080cfd2b22e05870.tar.gz |
tests: avoid '$MAKE' redirections, use 'run_make' instead
The use 'run_make' with the -E, -O and -M option, it is more
idiomatic now. Also, this way, centralized fixes and improvements
done in 'run_make' will automatically propagate through most of
the testsuite.
* syntax-checks.mk (sc_tests_no_run_make_redirect): Also check against
'$MAKE' invocations that uses output redirections (and not only against
'run_make' invocation that do so).
* Several tests: Adjust (and few minor cosmetic changes as well, while
at it).
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/color-tests2.sh')
-rw-r--r-- | t/color-tests2.sh | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/t/color-tests2.sh b/t/color-tests2.sh index 09ebff96c..6dcd2076d 100644 --- a/t/color-tests2.sh +++ b/t/color-tests2.sh @@ -152,6 +152,13 @@ test_no_color () fi } +our_make () +{ + set "MAKE=$MAKE" ${1+"$@"} + env "$@" expect -f $srcdir/expect-make >stdout || { cat stdout; exit 1; } + cat stdout +} + cat >expect-make <<'END' eval spawn $env(MAKE) -e check expect eof @@ -169,31 +176,21 @@ for vpath in false :; do $srcdir/configure - TERM=ansi MAKE=$MAKE expect -f $srcdir/expect-make >stdout \ - || { cat stdout; exit 1; } - cat stdout + our_make TERM=ansi test_color - TERM=dumb MAKE=$MAKE expect -f $srcdir/expect-make >stdout \ - || { cat stdout; exit 1; } - cat stdout + our_make TERM=dumb test_no_color - AM_COLOR_TESTS=no MAKE=$MAKE expect -f $srcdir/expect-make >stdout \ - || { cat stdout; exit 1; } - cat stdout + our_make AM_COLOR_TESTS=no test_no_color $srcdir/configure testsuite_colorized=false - TERM=ansi MAKE=$MAKE expect -f $srcdir/expect-make >stdout \ - || { cat stdout; exit 1; } - cat stdout + our_make TERM=ansi test_no_color - TERM=ansi MAKE="env AM_COLOR_TESTS=always $MAKE" \ - expect -f $srcdir/expect-make >stdout || { cat stdout; exit 1; } - cat stdout + our_make TERM=ansi MAKE="env AM_COLOR_TESTS=always $MAKE" test_color $MAKE distclean |