aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mtest.py
diff options
context:
space:
mode:
authorHemmo Nieminen <hemmo.nieminen@iki.fi>2022-02-01 00:00:00 +0200
committerEli Schwartz <eschwartz93@gmail.com>2022-06-09 18:58:33 -0400
commite9f77dc072ae3ed7b468f747176ffab0dccfc61f (patch)
tree6a14c245e9bb0b88401e0d59f34ba9ee571a83f6 /mesonbuild/mtest.py
parent5b0629dc1180cd9500d78db181bf59ff0d4811c5 (diff)
downloadmeson-e9f77dc072ae3ed7b468f747176ffab0dccfc61f.zip
meson-e9f77dc072ae3ed7b468f747176ffab0dccfc61f.tar.gz
meson-e9f77dc072ae3ed7b468f747176ffab0dccfc61f.tar.bz2
mtest: differentiate stdout and stderr in test log text files
Make --no-stdsplit option affect test log text files as well. This means that if the option --no-stdsplit is used only "output" is seen not only on the console but in the test log text file as well.
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r--mesonbuild/mtest.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index b5b1316..575dfc2 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -703,8 +703,13 @@ class TextLogfileBuilder(TestFileLogger):
if cmdline:
starttime_str = time.strftime("%H:%M:%S", time.gmtime(result.starttime))
self.file.write(starttime_str + ' ' + cmdline + '\n')
- self.file.write(dashes('output', '-', 78) + '\n')
- self.file.write(result.get_log())
+ if result.stdo:
+ name = 'stdout' if harness.options.split else 'output'
+ self.file.write(dashes(name, '-', 78) + '\n')
+ self.file.write(result.stdo)
+ if result.stde:
+ self.file.write(dashes('stderr', '-', 78) + '\n')
+ self.file.write(result.stde)
self.file.write(dashes('', '-', 78) + '\n\n')
async def finish(self, harness: 'TestHarness') -> None: