2 # Copyright (C) 2007, 2008 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Test Automake TESTS color output.
32 cat >>configure.
in <<END
36 cat >Makefile.am
<<'END'
37 AUTOMAKE_OPTIONS = color-tests
38 TESTS = $(check_SCRIPTS)
39 check_SCRIPTS = pass fail skip xpass xfail
40 XFAIL_TESTS = xpass xfail
60 chmod +x pass fail skip xpass xfail
69 grep ": pass" stdout |
$FGREP "$grn"
70 grep ": fail" stdout |
$FGREP "$red"
71 grep ": xfail" stdout |
$FGREP "$lgn"
72 grep ": xpass" stdout |
$FGREP "$red"
73 grep ": skip" stdout |
$FGREP "$blu"
78 grep ": pass" stdout |
$FGREP "$grn" && exit 1
79 grep ": fail" stdout |
$FGREP "$red" && exit 1
80 grep ": xfail" stdout |
$FGREP "$lgn" && exit 1
81 grep ": xpass" stdout |
$FGREP "$red" && exit 1
82 grep ": skip" stdout |
$FGREP "$blu" && exit 1
86 cat >expect-make
<<'END'
88 spawn $env(MAKE) -e check
94 AM_COLOR_TESTS
=always
$MAKE -e check
>stdout
&& { cat stdout
; exit 1; }
98 MAKE
=$MAKE expect
-f expect-make
>stdout ||
exit 77
102 AM_COLOR_TESTS
=no MAKE
=$MAKE expect
-f expect-make
>stdout ||
exit 77