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.
23 cat >> configure.ac
<<END
27 cat > Makefile.am
<< 'END'
28 TEST_EXTENSIONS
= .sh .
test
29 TESTS
= foo.
test bar.sh sub
/zardoz.
test
30 TEST_LOG_COMPILER
= $
(SHELL
)
31 SH_LOG_COMPILER
= $
(SHELL
)
33 ## Used to check some internal details. And yes, the quotes around
34 ## '$bases' are deliberate: they check for whitespace normalization.
36 $
(am__set_TESTS_bases
); echo "$$bases" > $@
39 cat > foo.
test << 'END'
47 FOO_STATUS
=0; export FOO_STATUS
55 # Check some internal details first.
58 for vpath
in : false
; do
71 test x
"$(cat tb)" = x
"foo bar sub/zardoz"
73 # Please don't change the order of the stuff in TESTS, below.
74 TESTS
='foo.test foo2.sh foo-log foolog.test a.log.b.sh 0.exe' $MAKE -e tb
75 test x
"$(cat tb)" = x
"foo foo2 foo-log foolog a.log.b 0.exe"
83 # The 'test-suite.stamp' file and the '.trs' files get created by
84 # "make check" and removed by "make clean" and "make mostlyclean".
93 test -f sub
/zardoz.trs
97 test ! -e sub
/zardoz.trs
98 # Unrelated '.trs' files shouldn't be removed.
102 # The files should be properly created in case of testsuite failure too.
103 FOO_STATUS
=1 $MAKE check
&& exit 1
106 test -f sub
/zardoz.trs
110 test ! -e sub
/zardoz.trs
111 # Unrelated '.trs' files shouldn't be removed.
112 test -f unrelated.trs
116 # Try with a subset of TESTS.
119 TESTS
=foo.
test $MAKE -e check
122 test ! -e sub
/zardoz.trs
125 TESTS
='foo.test bar.sh' $MAKE -e check
128 test ! -e sub
/zardoz.trs
129 # "make clean" shouldn't remove '.trs' files for tests not in $(TESTS).
130 TESTS
=bar.sh
$MAKE -e clean
137 # Try with a subset of TEST_LOGS.
140 TEST_LOGS
=sub
/zardoz.log
$MAKE -e check
143 test -f sub
/zardoz.trs
145 test ! -e sub
/zardoz.trs
146 TEST_LOGS
='foo.log bar.log' $MAKE -e check
149 test ! -e sub
/zardoz.trs
150 # "make clean" shouldn't remove '.trs' files for tests whose log
151 # is not in $(TEST_LOGS).
152 TEST_LOGS
=foo.log
$MAKE -e clean
155 test ! -e sub
/zardoz.trs