2 # Copyright (C) 2008-2017 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/>.
19 # For gen-testsuite-part: ==> try-with-serial-tests <==
23 cat >> configure.ac
<< 'END'
28 cat > Makefile.am
<< 'END'
29 AUTOMAKE_OPTIONS
= subdir-objects
30 TESTS
= foo sub
/foo $
(check_PROGRAMS
)
31 XFAIL_TESTS
= foo sub
/baz
32 check_PROGRAMS
= bar sub
/bar baz sub
/baz
39 test -f "$srcdir/Makefile.am"
43 test -f "$srcdir/Makefile.am"
48 int main (void) { return 0; }
50 cat > sub
/bar.c
<<'END'
51 int main (void) { return 0; }
55 int main (void) { return EXIT_FAILURE; }
57 cat > sub
/baz.c
<<'END'
59 int main (void) { return EXIT_FAILURE; }
67 run_make
-E -O -e FAIL check
68 grep 'XPASS.* foo$' stdout
69 grep '^[^X]*PASS.* sub/foo$' stdout
70 grep '^[^X]*PASS.* bar' stdout
71 grep '^[^X]*PASS.* sub/bar' stdout
72 grep '^[^X]*FAIL.* baz' stdout
73 grep 'XFAIL.* sub/baz' stdout
74 # The parallel test driver should cause circular dependencies.
75 # Look for known warnings from a couple of 'make' implementations.
76 grep -i 'circular.*dependency' stderr
&& exit 1
77 grep -i 'graph cycles' stderr
&& exit 1
84 run_make
-O -e FAIL check
85 # Note: we are not grepping for the space in the lines from the 'foo'
86 # tests, due to the Solaris make VPATH rewriting (if we fix that, we
87 # can still write a separate test for it).
88 grep 'XPASS.*foo$' stdout
89 grep '^[^X]*PASS.*sub/foo$' stdout
90 grep '^[^X]*PASS.* bar' stdout
91 grep '^[^X]*PASS.* sub/bar' stdout
92 grep '^[^X]*FAIL.* baz' stdout
93 grep 'XFAIL.* sub/baz' stdout