diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-22 16:38:47 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-22 17:28:44 +0200 |
commit | 2d5571e7dbfb41eec4a2657c4c076257a320d496 (patch) | |
tree | 79657771ac703291f449e4941f0594f7b5bf4f0d /t/color-tests-opt.sh | |
parent | 094b83a641e3b5b4aedf8820cb2af9d1c32cb476 (diff) | |
download | automake-2d5571e7dbfb41eec4a2657c4c076257a320d496.tar.gz |
check: support colorized testsuite output by default
Fixes automake bug#11855.
With this change, we make the 'color-tests' option enabled by default.
That option remains still silently accepted as a no-op, for backward
compatibility.
The developer of a package is still free to disable testsuite coloring on
a per-makefile basis (by adding "AM_COLOR_TESTS = no" to the Makefile.am)
or on a whole-project basis (by AC_SUBST'ing AM_COLOR_TESTS to "no" in
configure.ac). But now the user will be able to request the testsuite
output to be colorized, if he really wants to:
# With GNU make:
make AM_COLOR_TESTS=yes check
# With non-GNU make:
make AM_COLOR_TESTS=yes AM_MAKEFLAGS=AM_COLOR_TESTS=yes check
* NEWS: Update.
* doc/automake.texi: Updated, and some related minor reformatting
and rewording.
* automake.in (handle_tests): No need to pass the transform '%COLOR%'
when processing "check.am".
* lib/am/parallel-tests.am: Remove use of the '%?COLOR%' transform;
just act as if it were unconditionally TRUE.
* t/color.sh: No need to specify 'color-tests' in 'AUTOMAKE_OPTIONS'
nor in 'AM_INIT_AUTOMAKE'.
* t/ax/testsuite-summary-checks.sh: Likewise.
* t/ax/tap-summary-aux.sh: Likewise.
* t/color2.sh: Likewise. Also, ensure that colorized testsuite output
can be disabled by default by calling "AC_SUBST([AM_COLOR_TESTS], [no])".
* t/tap-realtime.sh: Define 'AM_COLOR_TESTS' to "no" in Makefile.am, to
avoid spurious colorization of the output due to the use of the 'expect'
program.
* t/color-tests-opt.sh: New test, check that the 'color-tests' option is
still recognized as a no-op.
* t/list-of-tests.mk: Add the new test.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/color-tests-opt.sh')
-rwxr-xr-x | t/color-tests-opt.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/t/color-tests-opt.sh b/t/color-tests-opt.sh new file mode 100755 index 000000000..87d88c9f9 --- /dev/null +++ b/t/color-tests-opt.sh @@ -0,0 +1,39 @@ +#! /bin/sh +# Copyright (C) 2007-2012 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Check that the 'color-tests' option, now active by default, is +# nonetheless still silently accepted, for backward compatibility. + +. ./defs || exit 1 + +cat >configure.ac <<END +AC_INIT([$me], [1.0]) +AM_INIT_AUTOMAKE([color-tests]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +END + +cat >Makefile.am <<END +AUTOMAKE_OPTIONS = color-tests +TESTS = foo.test +END + +: > test-driver + +$ACLOCAL +$AUTOMAKE + +: |