]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
coverage: TAP diagnostics after "Bail out!" aren't reported
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 12 Aug 2011 12:42:21 +0000 (14:42 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 12 Aug 2011 12:50:01 +0000 (14:50 +0200)
This is compatible with the behaviour of the `prove' utility.

* tests/tap-bailout-suppress-later-diagnostic.test: New test.
* tests/Makefile.am (tap_with_common_setup_tests): Update.

ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/tap-bailout-suppress-later-diagnostic.test [new file with mode: 0755]

index 42b23f591aad014f7c4d4aab6900841fe965545d..42985e0e2eabcf9257a2a2d4ee5db1ed5c21005f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: TAP diagnostics after "Bail out!" aren't reported
+       This is compatible with the behaviour of the `prove' utility.
+       * tests/tap-bailout-suppress-later-diagnostic.test: New test.
+       * tests/Makefile.am (tap_with_common_setup_tests): Update.
+
 2011-08-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        coverage: TAP errors after a "Bail out!" directive aren't reported
index 376802f806903c6ef2ce50fc40a461dfb5b78b07..b9b6bf76f9e6e7161533fde351924e9e5e581967 100644 (file)
@@ -1145,6 +1145,7 @@ tap_with_common_setup_tests = \
 tap-autonumber.test \
 tap-bailout.test \
 tap-bailout-suppress-badexit.test \
+tap-bailout-suppress-later-diagnostic.test \
 tap-bailout-suppress-later-errors.test \
 tap-color.test \
 tap-deps.test \
index b205f5691a3ee235a7ed1a9c81f976838e05175e..a298a5711dd73cb7f2a8f2fd58ec1ea860ed0582 100644 (file)
@@ -1385,6 +1385,7 @@ tap_with_common_setup_tests = \
 tap-autonumber.test \
 tap-bailout.test \
 tap-bailout-suppress-badexit.test \
+tap-bailout-suppress-later-diagnostic.test \
 tap-bailout-suppress-later-errors.test \
 tap-color.test \
 tap-deps.test \
diff --git a/tests/tap-bailout-suppress-later-diagnostic.test b/tests/tap-bailout-suppress-later-diagnostic.test
new file mode 100755 (executable)
index 0000000..679343f
--- /dev/null
@@ -0,0 +1,45 @@
+#! /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:
+#  - A "Bail out!" directive causes the driver to ignore any TAP
+#    diagnostic message in the rest of the following TAP stream.
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+. "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+
+echo AM_TEST_LOG_DRIVER_FLAGS = --comments >> Makefile
+
+cat > all.test <<END
+1..1
+# sanity check
+ok 1
+Bail out!
+# not seen
+END
+
+# Doing the sums above, we have:
+
+$MAKE check >stdout && { cat stdout; Exit 1; }
+cat stdout
+
+count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
+grep '# all.test: sanity check' stdout
+grep 'not seen' stdout && Exit 1
+
+: