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 features: runtime redefinition of $(TEST_SUITE_LOG).
22 cat >> configure.
in <<'END'
26 cat > Makefile.am
<<'END'
27 TESTS = pass.test skip.test xfail.test
28 XFAIL_TESTS = xfail.test
32 cat > pass.
test <<'END'
37 cat > skip.
test <<'END'
39 echo "% test skipped %"
43 cat > xfail.
test <<'END'
45 echo "# expected failure #"
53 sed -e "s|^ *$me 1\.0:.*$| $me 1.0: ???|" \
54 -e "s|^=====*|=======================|" $
*
59 test_log_edit orig
> exp
60 test_log_edit
$1 > got
61 diff exp got || Exit
1
74 cp test-suite.log orig
77 test -f test-suite.log
&& Exit
99 # Sanity check.
79 # Check that we can override the testsuite log file at runtime.
80 TEST_SUITE_LOG
=zardoz.log
$MAKE -e check
82 test ! -f test-suite.log
84 test_log_expected zardoz.log
85 # Sanity check the distribution too (this also does minimal checks on
87 TEST_SUITE_LOG
=zardoz.log
$MAKE -e distcheck
89 # Check that cleanup rules remove the correct file even when
90 # user overrides are in place.
91 cp orig test-suite.log
92 TEST_SUITE_LOG
=zardoz.log
$MAKE -e clean
95 diff orig test-suite.log
97 # Check that the default testsuite log doesn't get unduly modified.
98 # Also check that the testsuite log file doesn't need to be named
99 # accordingly to the `*.log' pattern.
100 chmod a-w test-suite.log
101 TEST_SUITE_LOG
=TheLogFile
$MAKE -e check
103 diff orig test-suite.log
104 test_log_expected TheLogFile
105 TEST_SUITE_LOG
=TheLogFile
$MAKE -e clean
108 diff orig test-suite.log