2 # Copyright (C) 2011-2017 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 interactions between the parallel test harness and "make -n".
18 # See also sister test 'parallel-tests-dry-run-1.sh'.
22 cat >> configure.ac
<< 'END'
26 cat > Makefile.am
<<'END'
27 TESTS = foo.test bar.test
28 TEST_LOG_COMPILER = $(SHELL)
40 run_make
-M -- -n "$@" ||
{ ls -l; exit 1; }
41 # Look out for possible errors from common tools used by recipes.
42 $EGREP -i ' (exist|permission|denied|no .*(such|file))' output
&& exit 1
43 $EGREP '(mv|cp|rm|cat|grep|sed|awk): ' output
&& exit 1
49 files
='foo.log bar.log foo.trs bar.trs'
51 echo 'exit 0' > foo.
test
52 echo 'exit 1' > bar.
test
54 for target
in check recheck test-suite.log
; do
60 test ! -e test-suite.log
77 echo 'exit 0' > bar.
test
79 for target
in check recheck test-suite.log
; do
81 grep '^:test-result: *FAIL' bar.trs
82 grep 'this is bad' foo.log test-suite.log
&& exit 1
83 : For shells with busted
'set -e'.
87 if test -r foo.log
; then
88 : You can still
read unreadable files
! Skip these checks.
90 for target
in check recheck test-suite.log
; do
93 test -f $f && test ! -r $f ||
exit 1
100 rm -f foo.log bar.trs
102 for target
in check recheck test-suite.log
$files; do