2 # Copyright (C) 2008, 2009, 2010 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 2, 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/>.
23 cat >> configure.
in << 'END'
29 cat > Makefile.am
<< 'END'
30 AUTOMAKE_OPTIONS
= subdir-objects
31 TESTS
= foo sub
/foo $
(check_PROGRAMS
)
32 XFAIL_TESTS
= foo sub
/baz
33 check_PROGRAMS
= bar sub
/bar baz sub
/baz
40 test -f "$srcdir/Makefile.am"
44 test -f "$srcdir/Makefile.am"
49 int main() { return 0; }
51 cat >>sub
/bar.c
<<'END'
52 int main() { return 0; }
56 int main() { return EXIT_FAILURE; }
58 cat >>sub
/baz.c
<<'END'
60 int main() { return EXIT_FAILURE; }
68 AM_COLOR_TESTS
=always
$MAKE -e check
>stdout
2>stderr
&&
69 { cat stdout
; cat stderr
>&2; Exit
1; }
72 grep 'XPASS.* foo$' stdout
73 grep '^[^X]*PASS.* sub/foo$' stdout
74 grep '^[^X]*PASS.* bar' stdout
75 grep '^[^X]*PASS.* sub/bar' stdout
76 grep '^[^X]*FAIL.* baz' stdout
77 grep 'XFAIL.* sub/baz' stdout
78 # parallel-tests should not add circular dependencies.
79 # Look for known warnings from a couple of `make' implementations.
80 grep -i 'circular.*dependency' stderr
&& Exit
1
81 grep -i 'graph cycles' stderr
&& Exit
1
88 $MAKE check
>stdout
&& { cat stdout
; Exit
1; }
90 # Note: we are not grepping for the space here, due to the Solaris make VPATH
91 # rewriting (if we fix that, we can still write a separate test for it).
92 grep 'XPASS.*foo$' stdout
93 grep '^[^X]*PASS.*sub/foo$' stdout
94 grep '^[^X]*PASS.*bar' stdout
95 grep '^[^X]*PASS.*sub/bar' stdout
96 grep '^[^X]*FAIL.*baz' stdout
97 grep 'XFAIL.*sub/baz' stdout