aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-01-04 16:49:19 -0500
committerNirbheek Chauhan <nirbheek@centricular.com>2023-02-19 02:55:57 +0530
commite2858b0cc044c591d2944be7f9d059ea25f1f0fa (patch)
tree614bcef6c39055422b3e94ffcf420534415fe013 /mesonbuild
parente5d77bcedc728bf2eeda7c4d8bfdc54144cf702c (diff)
downloadmeson-e2858b0cc044c591d2944be7f9d059ea25f1f0fa.zip
meson-e2858b0cc044c591d2944be7f9d059ea25f1f0fa.tar.gz
meson-e2858b0cc044c591d2944be7f9d059ea25f1f0fa.tar.bz2
mtest: do not warn when the TAP stream version is 12
Partial rollback of commit b7a5c384a1f1ba80c09904e7ef4f5160bdae3345. The rationale was based on a confusing wording of the TAP14 spec, which is under discussion for clarification / amendment. TAP14 doesn't (shouldn't) really say that missing a version line is potentially an error. Rather, this is the correct way to denote TAP12, which a TAP14 harness may not understand or try to parse. The intention was never to suggest that harnesses "should" take exception to the missing version line on the grounds that one should really add a version line. So, stop emitting an annoying warning for something that's valid usage. Meson understands TAP12 and that's okay. However, we do need to keep the part of that commit which set the version to 12 if it was otherwise unspecified. But instead of distinguishing between None and a version, just default to 12.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/mtest.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index bcf84d3..01dc3f1 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -1056,7 +1056,7 @@ class TestRunTAP(TestRun):
async def parse(self, harness: 'TestHarness', lines: T.AsyncIterator[str]) -> None:
res = None
warnings = [] # type: T.List[TAPParser.UnknownLine]
- version: T.Optional[int] = None
+ version = 12
async for i in TAPParser().parse_async(lines):
if isinstance(i, TAPParser.Version):
@@ -1075,9 +1075,6 @@ class TestRunTAP(TestRun):
self.additional_error += 'TAP parsing error: ' + i.message
res = TestResult.ERROR
- if version is None:
- self.warnings.append('Unknown TAP version. The first line MUST be `TAP version <int>`. Assuming version 12.')
- version = 12
if warnings:
unknown = str(mlog.yellow('UNKNOWN'))
width = len(str(max(i.lineno for i in warnings)))