summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/mtest.py2
-rw-r--r--test cases/unit/124 interactive tap/meson.build4
-rwxr-xr-xtest cases/unit/124 interactive tap/script.py5
-rw-r--r--unittests/allplatformstests.py8
4 files changed, 18 insertions, 1 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index 5a5d25758..673f433fd 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -1621,7 +1621,7 @@ class SingleTestRunner:
env=self.runobj.env,
cwd=self.test.workdir)
- if self.runobj.needs_parsing:
+ if self.runobj.needs_parsing and self.console_mode is not ConsoleUser.INTERACTIVE:
parse_coro = self.runobj.parse(harness, p.stdout_lines())
parse_task = asyncio.ensure_future(parse_coro)
else:
diff --git a/test cases/unit/124 interactive tap/meson.build b/test cases/unit/124 interactive tap/meson.build
new file mode 100644
index 000000000..30518db6f
--- /dev/null
+++ b/test cases/unit/124 interactive tap/meson.build
@@ -0,0 +1,4 @@
+project('interactive TAP output')
+
+test_script = find_program('script.py')
+test('main', test_script, protocol: 'tap')
diff --git a/test cases/unit/124 interactive tap/script.py b/test cases/unit/124 interactive tap/script.py
new file mode 100755
index 000000000..873a4ae81
--- /dev/null
+++ b/test cases/unit/124 interactive tap/script.py
@@ -0,0 +1,5 @@
+#!/usr/bin/env python3
+
+print('''1..2
+ok 1
+not ok 2''')
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index 8bbe7c644..57aa6315d 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -5177,3 +5177,11 @@ class AllPlatformTests(BasePlatformTests):
testdir = os.path.join(self.common_test_dir, '1 trivial')
self.init(testdir, extra_args=['-Dc_args=-DSOMETHING'])
self.init(testdir, extra_args=['--wipe'])
+
+ def test_interactive_tap(self):
+ testdir = os.path.join(self.unit_test_dir, '124 interactive tap')
+ self.init(testdir, extra_args=['--wrap-mode=forcefallback'])
+ output = self._run(self.mtest_command + ['--interactive'])
+ self.assertRegex(output, r'Ok:\s*0')
+ self.assertRegex(output, r'Fail:\s*0')
+ self.assertRegex(output, r'Ignored:\s*1')