dnl testsuite, so also use 'no-dependencies' and 'no-define' among
dnl the automake options to avoid bloating and potential problems.
AM_INIT_AUTOMAKE([dist-xz filename-length-max=99 color-tests
- parallel-tests silent-rules no-define no-dependencies])
+ parallel-tests no-define no-dependencies])
## Keep this on a line of its own, since it must be found and processed
- ## by the 'update-copyright' rule in out Makefile.
+ ## by the 'update-copyright' rule in our Makefile.
RELEASE_YEAR=2012
AC_SUBST([RELEASE_YEAR])
$srcdir/configure
- $MAKE check AM_COLOR_TESTS=always >stdout && { cat stdout; Exit 1; }
+ # Forced colorization should take place also with non-ANSI terminals;
+ # hence the "TERM=dumb" definition.
- TERM=dumb AM_COLOR_TESTS=always $MAKE -e check >stdout \
++ $MAKE check AM_COLOR_TESTS=always TERM=dumb >stdout \
+ && { cat stdout; Exit 1; }
cat stdout
test_color
- $MAKE check >stdout && { cat stdout; Exit 1; }
- TERM=ansi $MAKE -e check >stdout && { cat stdout; Exit 1; }
++ $MAKE check TERM=ansi >stdout && { cat stdout; Exit 1; }
cat stdout
test_no_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 about grep.
- 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
+ cat stdout | grep "$esc" && Exit 1
+ :
}
- AM_COLOR_TESTS=always $MAKE check >stdout && { cat stdout; Exit 1; }
+# 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.
+ TERM=dumb AM_COLOR_TESTS=always $MAKE check >stdout \
+ && { cat stdout; Exit 1; }
cat stdout
test_color
- $MAKE check >stdout && { cat stdout; Exit 1; }
-TERM=ansi $MAKE -e check >stdout \
- && { cat stdout; Exit 1; }
++$MAKE check TERM=ansi >stdout && { cat stdout; Exit 1; }
cat stdout
test_no_color