2 # Copyright (C) 2009-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 # Check parallel-tests features:
22 cat >> configure.ac << 'END'
26 cat > Makefile.am << 'END'
27 TEST_SUITE_LOG = mylog.log
28 TESTS = foo.test bar.test baz.test
35 cat > foo.test <<'END'
41 cat > bar.test <<'END'
46 cat > baz.test <<'END'
51 chmod a+x foo.test bar.test baz.test
58 $MAKE check >stdout && { cat stdout; exit 1; }
60 count_test_results total=3 pass=1 fail=1 skip=0 xfail=0 xpass=0 error=1
62 # Running this two times in a row should produce the same results the
65 using_gmake || $sleep # Required by BSD make.
66 $MAKE recheck >stdout && { cat stdout; exit 1; }
68 count_test_results total=2 pass=0 fail=1 skip=0 xfail=0 xpass=0 error=1
69 grep 'foo\.test' stdout && exit 1
70 grep '^ERROR: bar\.test$' stdout
71 grep '^FAIL: baz\.test$' stdout
74 # Ensure that recheck builds check_SCRIPTS, and that
75 # recheck reruns nothing if check has not been run.