aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mtest.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-01-14 11:06:46 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2021-01-22 12:18:59 +0100
commit289cc2e2c5e807995a27488c1354e73286de0cdf (patch)
tree8eab88950fe40e8be560f7e3b0397c944cf108c5 /mesonbuild/mtest.py
parenta0da710172c4743abccaef774c99c0cef4b1d9c3 (diff)
downloadmeson-289cc2e2c5e807995a27488c1354e73286de0cdf.zip
meson-289cc2e2c5e807995a27488c1354e73286de0cdf.tar.gz
meson-289cc2e2c5e807995a27488c1354e73286de0cdf.tar.bz2
mtest: use buffered stdout/stderr in parallel mode
Similar to ninja, buffer stdout/stderr even in verbose mode if more than one test is being run in parallel.
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r--mesonbuild/mtest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index e996931..6169d7d 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -614,7 +614,9 @@ class ConsoleLogger(TestLogger):
self.flush()
print(harness.format(result, mlog.colorize_console(), max_left_width=self.max_left_width),
flush=True)
- if result.res.is_bad():
+ if harness.options.verbose and harness.options.num_processes > 1:
+ self.print_log(result, result.get_log(mlog.colorize_console()))
+ elif result.res.is_bad():
self.print_log(result, '')
self.request_update()
@@ -1235,7 +1237,8 @@ class SingleTestRunner:
if self.options.gdb:
self.console_mode = ConsoleUser.GDB
- elif self.options.verbose and not self.runobj.needs_parsing:
+ elif self.options.verbose and self.options.num_processes == 1 and \
+ not self.runobj.needs_parsing:
self.console_mode = ConsoleUser.STDOUT
else:
self.console_mode = ConsoleUser.LOGGER