aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2022-02-27 22:12:58 +0200
committerGitHub <noreply@github.com>2022-02-27 22:12:58 +0200
commit008b1cef50f9fdc081a7e768a80736004da0b97c (patch)
tree25e1f74685fd4decaa2a5ff9f5dc810be99a8ad3
parent7559ba2db9970d55d4f7d330695b922b8e7554c3 (diff)
parent02b739feae4ac31ebe83649da0e73296304cbb5c (diff)
downloadmeson-008b1cef50f9fdc081a7e768a80736004da0b97c.zip
meson-008b1cef50f9fdc081a7e768a80736004da0b97c.tar.gz
meson-008b1cef50f9fdc081a7e768a80736004da0b97c.tar.bz2
Merge pull request #10004 from bonzini/mtest-tap-stderr
mtest: print stderr of TAP/Rust tests in verbose/non-parallel mode
-rw-r--r--mesonbuild/mtest.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index 3705ea2..02b0cba 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -606,11 +606,9 @@ class ConsoleLogger(TestLogger):
max_left_width=self.max_left_width,
right=test.res.get_text(mlog.colorize_console())))
print(test.res.get_command_marker() + test.cmdline)
- if test.needs_parsing:
- pass
- elif not test.is_parallel:
+ if test.direct_stdout:
print(self.output_start, flush=True)
- else:
+ elif not test.needs_parsing:
print(flush=True)
self.started_tests += 1
@@ -665,9 +663,8 @@ class ConsoleLogger(TestLogger):
if not harness.options.quiet or not result.res.is_ok():
self.flush()
- if result.verbose and not result.is_parallel and result.cmdline:
- if not result.needs_parsing:
- print(self.output_end)
+ if result.cmdline and result.direct_stdout:
+ print(self.output_end)
print(harness.format(result, mlog.colorize_console(), max_left_width=self.max_left_width))
else:
print(harness.format(result, mlog.colorize_console(), max_left_width=self.max_left_width),
@@ -900,6 +897,10 @@ class TestRun:
return self._num
@property
+ def direct_stdout(self) -> bool:
+ return self.verbose and not self.is_parallel and not self.needs_parsing
+
+ @property
def detail(self) -> str:
if self.res is TestResult.PENDING:
return ''
@@ -1341,7 +1342,7 @@ class SingleTestRunner:
if self.options.gdb:
self.console_mode = ConsoleUser.GDB
- elif self.runobj.verbose and not is_parallel and not self.runobj.needs_parsing:
+ elif self.runobj.direct_stdout:
self.console_mode = ConsoleUser.STDOUT
else:
self.console_mode = ConsoleUser.LOGGER