2 # Copyright (C) 2012 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/>.
17 # parallel-tests: "make recheck" "make -k recheck" in the face of build
18 # failures for the test cases. See automake bug#11791.
23 cat >> configure.ac
<< 'END'
28 cat > Makefile.am
<< 'END'
29 TESTS
= $
(EXTRA_PROGRAMS
)
33 echo 'int main (void) { return 1; }' > foo.c
41 $MAKE check
>stdout
&& { cat stdout
; exit 1; }
43 count_test_results total
=1 pass
=0 fail
=1 xpass
=0 xfail
=0 skip
=0 error
=0
45 st
=0; $MAKE -k recheck
>stdout || st
=$?
47 # Don't trust the exit status of "make -k" for non-GNU makes.
48 if using_gmake
&& test $st -eq 0; then exit 1; fi
49 count_test_results total
=1 pass
=0 fail
=1 xpass
=0 xfail
=0 skip
=0 error
=0
51 # Introduce an error in foo.c, that should cause a compilation failure.
53 echo choke me
>> foo.c
55 $MAKE recheck
>stdout
&& { cat stdout
; exit 1; }
57 # We don't get a change to run the testsuite.
58 $EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout
&& exit 1
59 # These shouldn't be removed, otherwise the next make recheck will do
64 st
=0; $MAKE -k recheck
>stdout || st
=$?
66 # Don't trust the exit status of "make -k" for non-GNU makes.
67 if using_gmake
&& test $st -eq 0; then exit 1; fi
68 # We don't get a change to run the testsuite.
69 $EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout
&& exit 1
73 # "Repair" foo.c, and expect everything to work.
75 echo 'int main (void) { return 0; }' > foo.c
77 $MAKE recheck
>stdout ||
{ cat stdout
; exit 1; }
79 count_test_results total
=1 pass
=1 fail
=0 xpass
=0 xfail
=0 skip
=0 error
=0
83 $MAKE recheck
>stdout ||
{ cat stdout
; exit 1; }
85 count_test_results total
=0 pass
=0 fail
=0 xpass
=0 xfail
=0 skip
=0 error
=0