]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
coverage: more TAP driver consistency w.r.t. 'prove'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 12 Aug 2011 09:38:55 +0000 (11:38 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 12 Aug 2011 09:41:52 +0000 (11:41 +0200)
* 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.

ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/tap-results-with-planskip.test [new file with mode: 0755]

index d346d05a268e4607de91b9f89ed32de0e50e040f..19ac010138aae944c14b4e7e9d0d5451fb62cc45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-08-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       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  <stefano.lattarini@gmail.com>
 
        tap: improve some comments in the TAP driver
index cf78cb649e18a79d9c3424033a4943aea31bb541..d1b294eddc46a31ad7e26ca1f305b6516dd28806 100644 (file)
@@ -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 \
index 39d1da07c9f45e6953818925872e370006fd55a4..9c39e9b455a6552a619b26a0572009053bdf925b 100644 (file)
@@ -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 (executable)
index 0000000..fa4f06e
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+
+# 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 <<END
+1..0 # SKIP
+ok 1 # SKIP
+END
+
+cat > bar.test <<END
+ok 1 # SKIP
+1..0 # SKIP
+END
+
+TESTS='foo.test bar.test' $MAKE -e check >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
+
+: