2 # Copyright (C) 2011-2013 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: normal and special exit statuses
18 # in the test scripts.
22 cat >> configure.ac << 'END'
26 # $failure_statuses should be defined to the list of all integers between
27 # 1 and 255 (inclusive), excluded 77 and 99.
28 failure_statuses=$(seq_ 1 255 | $EGREP -v '^(77|99)$' | tr "$nl" ' ')
30 echo "failure_statuses: $failure_statuses"
32 test $(for st in $failure_statuses; do echo $st; done | wc -l) -eq 253 \
33 || fatal_ "initializing list of exit statuses for simple failures"
35 cat > Makefile.am <<END
36 LOG_COMPILER = $AM_TEST_RUNNER_SHELL ./do-exit
37 fail_tests = $failure_statuses
38 TESTS = 0 77 99 $failure_statuses
46 [0-9]|[0-9][0-9]|[0-9][0-9][0-9]) st=$1;;
47 */[0-9]|*/[0-9][0-9]|*/[0-9][0-9][0-9]) st=${1##*/};;
62 for st in $failure_statuses; do
65 } | LC_ALL=C sort > exp-0
67 sed 's/^FAIL:/XFAIL:/' exp-0 | LC_ALL=C sort > exp-1
68 sed '/^ERROR:/d' exp-1 > exp-2
76 run_make -e IGNORE -O -- ${1+"$@"} check
78 LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-$n
85 test $am_make_rc -gt 0
86 mk_ 1 XFAIL_TESTS="$failure_statuses 99"
87 test $am_make_rc -gt 0
88 mk_ 2 XFAIL_TESTS="$failure_statuses" TESTS="0 77 $failure_statuses"
89 test $am_make_rc -eq 0