diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-04-30 20:44:50 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-04-30 21:00:48 +0200 |
commit | b105d40dc70fde616dd222c03ae642317fa205a6 (patch) | |
tree | 780c07fd5078d54e36d61735fd5b176f85276f30 /t/ax/tap-summary-aux.sh | |
parent | d6294a1283a3d88665ca9ec1592e959517172e59 (diff) | |
download | automake-b105d40dc70fde616dd222c03ae642317fa205a6.tar.gz |
color-tests: coloring can be forced on non-ANSI terminals as well
Before this change, colorization of testsuite output was suppressed
whenever the terminal was recognized to be a "dumb" one, incapable
of handling ANSI coloring (i.e., when the environment variable TERM
had a value of "dumb"). This happened even when the AM_COLOR_TESTS
variable was set to a value of "always".
Such a behaviour was suboptimal and slightly confusing; in fact, if
a user wants to force coloring of testsuite output that is being
redirected to a regular file, he should be able to do so even if his
terminal is not capable of handling ANSI colors -- in fact, such
terminal wouldn't be involved with the testsuite output in any way,
so why should it be allowed to influence it?
Thus, we now enable coloring of test output whenever AM_COLOR_TESTS
is set to "always", irrespective of the value of the TERM environment
variable.
* NEWS: Update.
* lib/am/check.am [%?COLOR%] (am__tty_colors): Activate colorization
of testsuite output whenever AM_COLOR_TESTS has the value of "always".
* t/ax/tap-summary-aux.sh: Export the TERM environment variable to
"dumb" when forcing colorization of the testsuite output; this should
*not* prevent such colorization from taking place, and we want to
check that this expectation really holds.
* t/ax/testsuite-summary-checks.sh: Likewise.
* t/color.sh: Likewise, and adjust some grepping checks.
* t/tap-color.sh: Likewise. Also, remove redundant "make check"
invocation since we are at it.
* t/color2.sh: Likewise, and check that exporting TERM=dumb actually
prevents testsuite output colorization when AM_COLOR_TESTS is unset.
* t/parallel-tests-reset-term.sh: Relax, to prevent it from failing
spuriously due to the new semantic.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/ax/tap-summary-aux.sh')
-rw-r--r-- | t/ax/tap-summary-aux.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/ax/tap-summary-aux.sh b/t/ax/tap-summary-aux.sh index 6e6a74abc..3848fd1b4 100644 --- a/t/ax/tap-summary-aux.sh +++ b/t/ax/tap-summary-aux.sh @@ -56,7 +56,9 @@ do_check () cat all.test st=0 if test $use_colors = yes; then - make_cmd="env TERM=ansi AM_COLOR_TESTS=always $MAKE -e" + # Forced colorization should take place also with non-ANSI terminals; + # hence the "TERM=dumb" definition. + make_cmd="env TERM=dumb AM_COLOR_TESTS=always $MAKE -e" else make_cmd=$MAKE fi |