summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgerioldman <k.gergo49@gmail.com>2024-08-12 01:21:08 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2025-01-08 12:05:47 +0200
commit2450342535274d13adbad6c0ac93aca82649c5c6 (patch)
tree43db4a7171a505385814ac088cdb15750474eedc
parent6299f181295b720391750d493456cd8d7bc3a0fd (diff)
downloadmeson-2450342535274d13adbad6c0ac93aca82649c5c6.tar.gz
Interpret TAP bailout output without test plan or test line as error
-rw-r--r--mesonbuild/mtest.py3
-rw-r--r--test cases/failing test/5 tap tests/meson.build1
2 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index 39970e530..bb58f617c 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -1125,7 +1125,8 @@ class TestRunTAP(TestRun):
'This is probably a bug in the test; if they are not TAP syntax, prefix them with a #')
if all(t.result is TestResult.SKIP for t in self.results):
# This includes the case where self.results is empty
- res = TestResult.SKIP
+ if res != TestResult.ERROR:
+ res = TestResult.SKIP
if res and self.res == TestResult.RUNNING:
self.res = res
diff --git a/test cases/failing test/5 tap tests/meson.build b/test cases/failing test/5 tap tests/meson.build
index 664ac34d2..27b9fe7ac 100644
--- a/test cases/failing test/5 tap tests/meson.build
+++ b/test cases/failing test/5 tap tests/meson.build
@@ -7,3 +7,4 @@ test('nonzero return code with tests', test_with_status, protocol: 'tap')
test('missing test', tester, args : ['1..1'], protocol: 'tap')
test('incorrect skip', tester, args : ['1..1 # skip\nok 1'], protocol: 'tap')
test('partially skipped', tester, args : ['not ok 1\nok 2 # skip'], protocol: 'tap')
+test('premature bailout', tester, args : ['Bail out!'], protocol: 'tap')