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.
pull/9478/head
Hemmo Nieminen 3 years ago committed by Eli Schwartz
parent 5b0629dc11
commit e9f77dc072
  1. 9
      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:

Loading…
Cancel
Save