diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-01-14 11:06:46 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-01-22 12:18:59 +0100 |
commit | 289cc2e2c5e807995a27488c1354e73286de0cdf (patch) | |
tree | 8eab88950fe40e8be560f7e3b0397c944cf108c5 /mesonbuild/mtest.py | |
parent | a0da710172c4743abccaef774c99c0cef4b1d9c3 (diff) | |
download | meson-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.py | 7 |
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 |