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 # Option 'serial-tests'.
19 # To avoid useless generation of a sibling test.
21 am_create_testdir=empty
24 hasnt_parallel_tests ()
26 $EGREP 'TEST_SUITE_LOG|TEST_LOGS|\.log.*:' $1 && Exit 1
27 grep 'recheck.*:' $1 && Exit 1
28 grep '^check-TESTS: \$(TESTS)$' $1
33 $EGREP '(^| )check-TESTS.*:' $1
34 $EGREP '(^| )recheck.*:' $1
35 grep '^\$(TEST_SUITE_LOG): \$(TEST_LOGS)$' $1
36 grep '^\.test\.log:$' $1
41 cat >> one/configure.ac <<END
43 AM_INIT_AUTOMAKE([serial-tests])
44 AC_CONFIG_FILES([Makefile])
47 echo 'TESTS = foo.test bar.test' > one/Makefile.am
49 cat >> two/configure.ac <<END
51 AC_CONFIG_AUX_DIR([config])
52 AM_INIT_AUTOMAKE([parallel-tests])
53 AC_CONFIG_FILES([aMakefile bMakefile])
56 cp one/Makefile.am two/aMakefile.am
57 cat - one/Makefile.am > two/bMakefile.am <<END
58 AUTOMAKE_OPTIONS = serial-tests
62 touch missing install-sh
65 grep TEST Makefile.in # For debugging.
66 hasnt_parallel_tests Makefile.in
73 $AUTOMAKE --add-missing
74 grep TEST [ab]Makefile.in # For debugging.
75 has_parallel_tests aMakefile.in
76 hasnt_parallel_tests bMakefile.in
77 mv aMakefile.in aMakefile.sav
78 mv bMakefile.in bMakefile.sav
80 test -f config/test-driver
82 diff aMakefile.sav aMakefile.in
83 diff bMakefile.sav bMakefile.in