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-tests interactions with "make -n".
18 # See also sister test 'parallel-tests-dry-run-1.test'.
23 cat >> configure.ac << 'END'
27 cat > Makefile.am <<'END'
28 TESTS = foo.test bar.test
29 TEST_LOG_COMPILER = $(SHELL)
41 $MAKE -n "$@" >output 2>&1 || { cat output; ls -l; Exit 1; }
43 # Look out for possible errors from common tools used by recipes.
44 $EGREP -i ' (exist|permission|denied|no .*(such|file))' output && Exit 1
45 $EGREP '(mv|cp|rm|cat|grep|sed|awk): ' output && Exit 1
51 files='foo.log bar.log foo.trs bar.trs'
53 for target in check recheck test-suite.log; do
58 test ! -f test-suite.log
61 # Creative quoting below to please maintainer-check.
62 echo exit '0' > foo.test
63 echo exit '1' > bar.test
75 # Creative quoting below to please maintainer-check.
80 echo exit '0' > bar.test
82 for target in check recheck test-suite.log; do
84 grep '^:test-result: *FAIL' bar.trs
85 grep 'this is bad' foo.log test-suite.log && Exit 1
86 : For shells with busted 'set -e'.
90 if test -r foo.log; then
91 : You can still read unreadable files! Skip these checks.
93 for target in check recheck test-suite.log; do
96 test -f $f && test ! -r $f || Exit 1
103 rm -f foo.log bar.trs
105 for target in check recheck test-suite.log $files; do