aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemmo Nieminen <hemmo.nieminen@iki.fi>2022-02-01 00:00:00 +0200
committerHemmo Nieminen <hemmo.nieminen@iki.fi>2022-03-23 00:00:00 +0200
commit451cb5f2be6bcaaf9c1318d73f099988d16037f2 (patch)
tree83397f969c27b10e2cfb4653164a17448519faa0
parent4b64776fce28f00ebb226a70b55a8bccebab9350 (diff)
downloadmeson-451cb5f2be6bcaaf9c1318d73f099988d16037f2.zip
meson-451cb5f2be6bcaaf9c1318d73f099988d16037f2.tar.gz
meson-451cb5f2be6bcaaf9c1318d73f099988d16037f2.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.
-rw-r--r--mesonbuild/mtest.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index 4d126b4..498cb6b 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -708,8 +708,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: