From 217629d901e93d7280e44b1b189b59e4a0c189ec Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 5 Dec 2024 08:07:31 +0100 Subject: [PATCH] test: fix hang when running tests that need parsing with `--interactive` When running tests with `--interactive` we don't redirect stdin, stdout or stderr and instead pass them on to the user's console. This redirect causes us to hang in case the test in question needs parsing, like it is the case for TAP output, because we cannot read the process's stdout. Fix this hang by not parsing output when running in interactive mode. --- mesonbuild/mtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 503cb14325dd..fef77d89ce08 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -1578,7 +1578,7 @@ async def _run_cmd(self, harness: 'TestHarness', cmd: T.List[str]) -> None: 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: