2 # Copyright (C) 2011 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:
18 # - $(TEST_SUITE_LOG) and $(TESTS)
19 # - $(TEST_SUITE_LOG) and $(TEST_LOGS)
26 cat >> configure.
in <<'END'
30 cat > Makefile.am
<<'END'
31 TESTS = pass.test pass2.test skip.test skip2.test fail.test
34 cat > pass.
test <<'END'
39 cp pass.
test pass2.
test
41 cat > skip.
test <<'END'
43 echo "% skipped test %"
47 cp skip.
test skip2.
test
49 cat > fail.
test <<'END'
62 for test_list_override
in \
63 'TESTS=pass.test skip.test' \
64 'TEST_LOGS=pass.log skip.log'
66 env TEST_SUITE_LOG
=partial.log
"$test_list_override" \
67 $MAKE -e check
>stdout ||
{ cat stdout
; Exit
1; }
73 test ! -f test-suite.log
77 grep '^PASS: .*pass\.test' stdout
78 grep '^SKIP: .*skip\.test' stdout
79 $FGREP 'skip.test' partial.log
80 $FGREP '% skipped test %' partial.log
81 for t
in pass2 skip2 fail
; do
82 $FGREP "$t.test" stdout
&& Exit
1
83 $FGREP "$t.test" partial.log
&& Exit
1