diff options
Diffstat (limited to 't/tap-color.sh')
-rw-r--r-- | t/tap-color.sh | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/t/tap-color.sh b/t/tap-color.sh index 44e741d82..a44516ca3 100644 --- a/t/tap-color.sh +++ b/t/tap-color.sh @@ -117,41 +117,17 @@ test_color () test_no_color () { - # With make implementations that, like Solaris make, in case of errors - # print the whole failing recipe on standard output, we should content - # ourselves with a laxer check, to avoid false positives. - # Keep this in sync with lib/am/check.am:$(am__color_tests). - if $FGREP '= Xalways; then' stdout; then - # Extra verbose make, resort to laxer checks. - # But we also want to check that the testsuite summary is not unduly - # colorized. - ( - set +e # In case some grepped regex below isn't matched. - # Not a useless use of cat; see above comments "grep-nonprinting" - # requirement in 'test-init.sh'. - cat stdout | grep "TOTAL.*:" - cat stdout | grep "PASS.*:" - cat stdout | grep "FAIL.*:" - cat stdout | grep "SKIP.*:" - cat stdout | grep "XFAIL.*:" - cat stdout | grep "XPASS.*:" - cat stdout | grep "ERROR.*:" - cat stdout | grep "^#" - cat stdout | grep 'test.*expected' - cat stdout | grep 'test.*not run' - cat stdout | grep '====' - cat stdout | grep '[Ss]ee .*test-suite\.log' - cat stdout | grep '[Tt]estsuite summary' - ) | grep "$esc" && exit 1 - : For shells with broken 'set -e' - else - cat stdout | grep "$esc" && exit 1 - : For shells with broken 'set -e' - fi + # Not a useless use of cat; see above comments "grep-nonprinting" + # requirement in 'test-init.sh'. + cat stdout | grep "$esc" && exit 1 + : For 'set -e'. } +# It should be possible to override AM_COLOR_TESTS also from the +# environment. # Forced colorization should take place also with non-ANSI terminals; # hence the "TERM=dumb" definition. + AM_COLOR_TESTS=always; export AM_COLOR_TESTS run_make -O -e FAIL TERM=dumb check test_color |