aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-05-23 12:01:17 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2022-05-24 20:15:34 +0300
commita7e458effadbc884eacf34528df3a57b60e43fe3 (patch)
tree9981a4b693cb5513b434c5739ff6926fc06a7821
parent4acab57d476cb55da1e066831422a52149c346f5 (diff)
downloadmeson-a7e458effadbc884eacf34528df3a57b60e43fe3.zip
meson-a7e458effadbc884eacf34528df3a57b60e43fe3.tar.gz
meson-a7e458effadbc884eacf34528df3a57b60e43fe3.tar.bz2
mtest: ignore invalid input
TAP version 14 introduced subtests, that are supposedly backward compatible because "TAP13 specifies that non-TAP output should be ignored". Meson reported TAP syntax errors based on behavior of "prove" at the time, but it seems that now "prove" has become a lot more lenient; it even accepts the following completely bogus input just fine: --- ok 1 ok 2 x 1..1 --- So do the same and make Meson's parser accept invalid TAP input silently. Fixes: #10032
-rw-r--r--mesonbuild/mtest.py5
-rw-r--r--unittests/taptests.py1
2 files changed, 0 insertions, 6 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index a4ea5aa..5c4d7bc 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -426,11 +426,6 @@ class TAPParser:
else:
yield self.Version(version=self.version)
return
-
- if not line:
- return
-
- yield self.Error(f'unexpected input at line {self.lineno}')
else:
# end of file
if self.state == self._YAML:
diff --git a/unittests/taptests.py b/unittests/taptests.py
index 54946cf..477d797 100644
--- a/unittests/taptests.py
+++ b/unittests/taptests.py
@@ -255,7 +255,6 @@ class TAPParserTests(unittest.TestCase):
def test_unexpected(self):
events = self.parse_tap('1..1\ninvalid\nok 1')
self.assert_plan(events, num_tests=1, late=False)
- self.assert_error(events)
self.assert_test(events, number=1, name='', result=TestResult.OK)
self.assert_last(events)