From: Stefano Lattarini Date: Mon, 1 Aug 2011 17:10:41 +0000 (+0200) Subject: testsuite: separate the only failing check of an xfailing test X-Git-Tag: ng-0.5a~89^2~155^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a017bc080e3c36daa7ee0f3e26820d5f8540fe74;p=thirdparty%2Fautomake.git 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'. --- diff --git a/ChangeLog b/ChangeLog index a155e2daa..72fa8a957 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-08-01 Stefano Lattarini + + 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'. + 2011-08-01 Stefano Lattarini testsuite: fix spurious errors in an xfailing test on TAP support diff --git a/lib/tap-driver b/lib/tap-driver index 8237fecb2..3facdfd3d 100755 --- a/lib/tap-driver +++ b/lib/tap-driver @@ -69,7 +69,7 @@ Getopt::Long::GetOptions ( 'version' => sub { print "$ME $VERSION"; exit 0; }, 'test-name=s' => \$test_script_name, 'log-file=s' => \$log_file, - 'res-file=s' => \$trs_file, + 'trs-file=s' => \$trs_file, 'color-tests=s' => \&bool_opt, 'expect-failure=s' => \&bool_opt, 'enable-hard-errors=s' => \&bool_opt, diff --git a/tests/Makefile.am b/tests/Makefile.am index c1c878dcc..b8126f27d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -27,7 +27,7 @@ gcj6.test \ override-conditional-2.test \ pr8365-remake-timing.test \ yacc-dist-nobuild-subdir.test \ -tap-bad-prog.test \ +tap-bad-prog2.test \ tap-plan-corner2.test \ tap-message-0.test \ tap-signal.test \ @@ -1181,6 +1181,7 @@ EXTRA_DIST += tap-setup.sh tap_other_tests = \ tap-common-setup.test \ tap-bad-prog.test \ +tap-bad-prog2.test \ tap-basic.test \ tap-doc.test \ tap-empty.test \ @@ -1190,6 +1191,8 @@ tap-recheck.test \ tap-summary.test \ tap-summary-color.test +tap-bad-prog2.log: tap-bad-prog.log + tap-summary.log tap-summary-color.log: tap-summary-aux.sh EXTRA_DIST += tap-summary-aux.sh diff --git a/tests/Makefile.in b/tests/Makefile.in index c3b79eec4..82e62a396 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -279,7 +279,7 @@ EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \ extract-testsuite-summary tap-setup.sh tap-summary-aux.sh XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \ override-conditional-2.test pr8365-remake-timing.test \ - yacc-dist-nobuild-subdir.test tap-bad-prog.test \ + yacc-dist-nobuild-subdir.test tap-bad-prog2.test \ tap-plan-corner2.test tap-message-0.test tap-signal.test \ txinfo5.test $(instspc_xfail_tests) parallel_tests = backcompat5-p.test check-exported-srcdir-p.test \ @@ -1414,6 +1414,7 @@ tap_with_common_setup_logs = $(tap_with_common_setup_tests:.test=.log) tap_other_tests = \ tap-common-setup.test \ tap-bad-prog.test \ +tap-bad-prog2.test \ tap-basic.test \ tap-doc.test \ tap-empty.test \ @@ -1882,6 +1883,8 @@ testsuite-summary-count-many.log: extract-testsuite-summary # Their dependencies. $(tap_with_common_setup_logs): tap-common-setup.log tap-setup.sh +tap-bad-prog2.log: tap-bad-prog.log + tap-summary.log tap-summary-color.log: tap-summary-aux.sh # Dependencies valid for each test case. diff --git a/tests/tap-bad-prog.test b/tests/tap-bad-prog.test index e20009d04..4c070cea3 100755 --- a/tests/tap-bad-prog.test +++ b/tests/tap-bad-prog.test @@ -18,6 +18,9 @@ # - 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 @@ -62,6 +65,4 @@ grep '^ERROR: none\.test' stdout grep '^ERROR: noexec\.test' stdout grep '^ERROR: noread\.test' stdout -count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=3 - : diff --git a/tests/tap-bad-prog2.test b/tests/tap-bad-prog2.test new file mode 100755 index 000000000..5d4a47ebf --- /dev/null +++ b/tests/tap-bad-prog2.test @@ -0,0 +1,30 @@ +#! /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 . + +# TAP support: +# - missing, unreadable, or not-executable test scripts cause the +# proper amount of "ERROR" results + +. ./defs || Exit 1 + +# For this test, we completely rely on the data obtained by sister test +# `tap-bad-prog.test'. +cp ../tap-bad-prog.dir/stdout . \ + || fatal_ "can't get data from sister test 'test-bad-prog'" +cat stdout +count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=3 + +: