Hash :
a017bc08
Author :
Date :
2011-08-01T19:10:41
testsuite: separate the only failing check of an xfailing test * tests/plan-bad-prog.test: Move the only failing check of this test (i.e., the one about the total number of "ERROR" outcomes) into ... * tests/plan-bad-prog2.test: ... this new test. * tests/Makefile.am (XFAIL_TESTS): Remove `plan-bad-prog.test', add `plan-bad-prog2.test'. (tap_other_tests): Add `plan-bad-prog2.test'. (plan-bad-prog2.log): Depend on `plan-bad-prog.test'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
#! /bin/sh
# Copyright (C) 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# TAP support:
# - missing, unreadable, or not-executable test scripts cause proper
# error reports
# The files created by this test will be required also by the sister
# test `tap-bad-prog2.test', so we can't remove the test directory.
keep_testdirs=yes
parallel_tests=yes
. ./defs || Exit 1
cp "$top_testsrcdir"/lib/tap-driver . \
|| fatal_ "failed to fetch auxiliary script tap-driver"
cat >> configure.in <<END
AC_SUBST([PERL], ['$PERL'])
AC_OUTPUT
END
cat > Makefile.am << 'END'
TEST_LOG_DRIVER = $(PERL) $(srcdir)/tap-driver
TESTS = none.test noread.test noexec.test
none.test:
END
cat > noexec.test <<'END'
#!/bin/sh
echo 1..1
ok 1
END
./noexec.test && skip_ "can't have non-executable files"
cp noexec.test noread.test
chmod a-r noread.test
test -r noread.test && skip_ "you can still read unreadable files"
$ACLOCAL
$AUTOCONF
$AUTOMAKE
./configure
$MAKE check >stdout && { cat stdout; Exit 1; }
cat stdout
# FIXME: maybe better error messages?
grep '^ERROR: none\.test' stdout
grep '^ERROR: noexec\.test' stdout
grep '^ERROR: noread\.test' stdout
: