From b084abad79ac1e169050c684df32260535c395b7 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 6 Oct 2021 17:21:58 -0300 Subject: [PATCH] validate:launcher: Fix adding logs to xunit Part-of: --- subprojects/gst-devtools/validate/launcher/reporters.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-devtools/validate/launcher/reporters.py b/subprojects/gst-devtools/validate/launcher/reporters.py index 3f100bd695..0baeb125fd 100644 --- a/subprojects/gst-devtools/validate/launcher/reporters.py +++ b/subprojects/gst-devtools/validate/launcher/reporters.py @@ -147,7 +147,7 @@ class XunitReporter(Reporter): return super(XunitReporter, self).final_report() def _get_all_logs_data(self, test): - if not self.options.redirect_logs: + if self.options.redirect_logs: return "" captured = "" @@ -216,12 +216,12 @@ class XunitReporter(Reporter): xml_file = codecs.open(self.tmp_xml_file.name, 'a', self.encoding, 'replace') xml_file.write(self._forceUnicode( - '' - '%(logs)s' + '%(systemout)s' + '' '' % {'name': self._quoteattr(test.get_classname() + '.' + test.get_name()), 'taken': test.time_taken, - 'logs': self._get_all_logs_data(test), + 'systemout': self._get_captured(test), 'errtype': self._quoteattr(test.result), 'message': self._quoteattr(test.message), }))