2 # Copyright (C) 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/>.
17 # Check parallel-tests features:
25 cat >> configure.in << 'END'
29 cat > Makefile.am << 'END'
30 TEST_SUITE_LOG = mylog.log
31 TESTS = foo.test bar.test baz.test
38 cat >>foo.test <<'END'
44 cat >>bar.test <<'END'
49 cat >>baz.test <<'END'
54 chmod a+x foo.test bar.test baz.test
61 $MAKE check >stdout && { cat stdout; Exit 1; }
64 $MAKE recheck >stdout && { cat stdout; Exit 1; }
66 grep foo.test stdout && Exit 1
67 grep bar.test stdout || Exit 1
68 grep baz.test stdout || Exit 1
69 grep '2 of 2.*failed' stdout
71 # If we cannot read the log file, then redo it as well.
73 if test ! -r foo.log; then
74 $MAKE recheck >stdout && { cat stdout; Exit 1; }
76 grep foo.test stdout || Exit 1
79 # Ensure that recheck builds check_SCRIPTS, and that
80 # recheck reruns nothing if check has not been run.