From: Stefano Lattarini Date: Fri, 12 Aug 2011 09:38:55 +0000 (+0200) Subject: coverage: more TAP driver consistency w.r.t. 'prove' X-Git-Tag: ng-0.5a~89^2~101^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4a752a353c3fd15dbe7cb5d2b5e01996546d75c;p=thirdparty%2Fautomake.git coverage: more TAP driver consistency w.r.t. 'prove' * tests/skip-results-with-planskip.test: New test, verifies that test results seen in a TAP stream that has a "plan with SKIP" are flagged as errors. * tests/Makefile.am (tap_with_common_setup_tests): Update. --- diff --git a/ChangeLog b/ChangeLog index d346d05a2..19ac01013 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-08-12 Stefano Lattarini + + coverage: more TAP driver consistency w.r.t. 'prove' + * tests/skip-results-with-planskip.test: New test, verifies that + test results seen in a TAP stream that has a "plan with SKIP" are + flagged as errors. + * tests/Makefile.am (tap_with_common_setup_tests): Update. + 2011-08-12 Stefano Lattarini tap: improve some comments in the TAP driver diff --git a/tests/Makefile.am b/tests/Makefile.am index cf78cb649..d1b294edd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1183,6 +1183,7 @@ tap-skip-whole-badexit.test \ tap-skip-whole-bailout.test \ tap-skip-whole-continue.test \ tap-skip-whole-unplanned.test \ +tap-results-with-planskip.test \ tap-todo-skip-together.test \ tap-todo-skip-whitespace.test \ tap-todo-skip.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 39d1da07c..9c39e9b45 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1423,6 +1423,7 @@ tap-skip-whole-badexit.test \ tap-skip-whole-bailout.test \ tap-skip-whole-continue.test \ tap-skip-whole-unplanned.test \ +tap-results-with-planskip.test \ tap-todo-skip-together.test \ tap-todo-skip-whitespace.test \ tap-todo-skip.test \ diff --git a/tests/tap-results-with-planskip.test b/tests/tap-results-with-planskip.test new file mode 100755 index 000000000..fa4f06e1b --- /dev/null +++ b/tests/tap-results-with-planskip.test @@ -0,0 +1,47 @@ +#! /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: +# - test results seen in a TAP stream that has a "plan with SKIP" are +# flagged as errors. + +parallel_tests=yes +. ./defs || Exit 1 + +. "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh" + +cat > foo.test < bar.test <stdout && { cat stdout; Exit 1; } +cat stdout + +count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=3 + +grep '^SKIP: foo\.test$' stdout +grep '^ERROR: foo\.test 1 # UNPLANNED$' stdout +grep '^ERROR: foo\.test - too many tests run (expected 0, got 1)$' stdout +grep '^SKIP: bar\.test 1 # SKIP$' stdout +grep '^ERROR: bar\.test - too many tests run (expected 0, got 1)$' stdout + +: