2 # Copyright (C) 2011-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 harness features:
18 # - creation and removal of '.trs' auxiliary files
19 # - check some internals regarding the use of '.trs' files.
24 cat >> configure.ac <<END
28 cat > Makefile.am << 'END'
29 TEST_EXTENSIONS = .sh .test
30 TESTS = foo.test bar.sh sub/zardoz.test
31 TEST_LOG_COMPILER = $(SHELL)
32 SH_LOG_COMPILER = $(SHELL)
34 ## Used to check some internal details. And yes, the quotes around
35 ## '$bases' are deliberate: they check for whitespace normalization.
37 $(am__set_TESTS_bases); echo "$$bases" > $@
40 cat > foo.test << 'END'
48 FOO_STATUS=0; export FOO_STATUS
56 # Check some internal details first.
59 for vpath in : false; do
72 test x"`cat tb`" = x"foo bar sub/zardoz"
74 # Please don't change the order of the stuff in TESTS, below.
75 TESTS='foo.test foo2.sh foo-log foolog.test a.log.b.sh 0.exe' $MAKE -e tb
76 test x"`cat tb`" = x"foo foo2 foo-log foolog a.log.b 0.exe"
84 # The 'test-suite.stamp' file and the '.trs' files get created by
85 # "make check" and removed by "make clean" and "make mostlyclean".
94 test -f sub/zardoz.trs
98 test ! -f sub/zardoz.trs
99 # Unrelated '.trs' files shouldn't be removed.
100 test -f unrelated.trs
103 # The files should be properly created in case of testsuite failure too.
104 FOO_STATUS=1 $MAKE check && Exit 1
107 test -f sub/zardoz.trs
111 test ! -f sub/zardoz.trs
112 # Unrelated '.trs' files shouldn't be removed.
113 test -f unrelated.trs
117 # Try with a subset of TESTS.
120 TESTS=foo.test $MAKE -e check
123 test ! -f sub/zardoz.trs
126 TESTS='foo.test bar.sh' $MAKE -e check
129 test ! -f sub/zardoz.trs
130 # "make clean" shouldn't remove '.trs' files for tests not in $(TESTS).
131 TESTS=bar.sh $MAKE -e clean
138 # Try with a subset of TEST_LOGS.
141 TEST_LOGS=sub/zardoz.log $MAKE -e check
144 test -f sub/zardoz.trs
146 test ! -f sub/zardoz.trs
147 TEST_LOGS='foo.log bar.log' $MAKE -e check
150 test ! -f sub/zardoz.trs
151 # "make clean" shouldn't remove '.trs' files for tests whose log
152 # is not in $(TEST_LOGS).
153 TEST_LOGS=foo.log $MAKE -e clean
156 test ! -f sub/zardoz.trs