2 # Copyright (C) 2012-2013 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 am_create_testdir=empty
22 hasnt_parallel_tests ()
24 $EGREP 'TEST_SUITE_LOG|TEST_LOGS|\.log.*:' $1 && exit 1
25 grep 'recheck.*:' $1 && exit 1
26 grep '^check-TESTS: \$(TESTS)$' $1
31 $EGREP '(^| )check-TESTS.*:' $1
32 $EGREP '(^| )recheck.*:' $1
33 grep '^\$(TEST_SUITE_LOG): \$(TEST_LOGS)$' $1
34 grep '^\.test\.log:$' $1
39 cat > one/configure.ac <<END
41 AM_INIT_AUTOMAKE([serial-tests])
42 AC_CONFIG_FILES([Makefile])
45 echo 'TESTS = foo.test bar.test' > one/Makefile.am
47 cat > two/configure.ac <<END
49 AC_CONFIG_AUX_DIR([config])
50 AM_INIT_AUTOMAKE([parallel-tests])
51 AC_CONFIG_FILES([aMakefile bMakefile])
54 cp one/Makefile.am two/aMakefile.am
55 cat - one/Makefile.am > two/bMakefile.am <<END
56 AUTOMAKE_OPTIONS = serial-tests
60 touch missing install-sh
63 grep TEST Makefile.in # For debugging.
64 hasnt_parallel_tests Makefile.in
71 $AUTOMAKE --add-missing
72 grep TEST [ab]Makefile.in # For debugging.
73 has_parallel_tests aMakefile.in
74 hasnt_parallel_tests bMakefile.in
75 mv aMakefile.in aMakefile.sav
76 mv bMakefile.in bMakefile.sav
78 test -f config/test-driver
80 diff aMakefile.sav aMakefile.in
81 diff bMakefile.sav bMakefile.in