2 # Copyright (C) 2011-2024 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 <https://www.gnu.org/licenses/>.
17 # Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG)
18 # for the recheck target.
22 cat >> configure.ac
<<'END'
26 cat > Makefile.am
<<'END'
27 TESTS = foofoo.test barbar.test bazbaz.test
30 cat > foofoo.
test <<'END'
36 cat > barbar.
test <<'END'
42 cat > bazbaz.
test <<'END'
45 exit ${BAZ_EXIT_STATUS-1}
56 # Filter make output before grepping it, for make implementations that,
57 # like Solaris' one, print the whole of the failed recipe on failure.
60 grep -v 'bases=.*;' stdout
> t
&& mv -f t stdout
64 run_make
-O -e FAIL check
66 using_gmake ||
$sleep # Required by BSD make.
68 chmod a-rw test-suite.log
69 run_make
-O -e FAIL TEST_SUITE_LOG
=my.log recheck
72 count_test_results total
=2 pass
=0 fail
=1 skip
=0 xfail
=0 xpass
=0 error
=1
73 for x
in stdout my.log
; do
74 $FGREP foofoo
$x && exit 1
79 using_gmake ||
$sleep # Required by BSD make.
82 run_make
-O -e FAIL BAZ_EXIT_STATUS
=0 TEST_SUITE_LOG
=my2.log recheck
84 count_test_results total
=2 pass
=1 fail
=0 skip
=0 xfail
=0 xpass
=0 error
=1
86 $FGREP foofoo stdout
&& exit 1
89 $FGREP foofoo my2.log
&& exit 1
91 $FGREP bazbaz my2.log
&& exit 1
93 chmod u
+r test-suite.log my.log
94 $FGREP bazbaz test-suite.log