mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
validate:launcher: Fix adding logs to xunit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>
This commit is contained in:
parent
078f7874fd
commit
b084abad79
1 changed files with 4 additions and 4 deletions
|
@ -147,7 +147,7 @@ class XunitReporter(Reporter):
|
||||||
return super(XunitReporter, self).final_report()
|
return super(XunitReporter, self).final_report()
|
||||||
|
|
||||||
def _get_all_logs_data(self, test):
|
def _get_all_logs_data(self, test):
|
||||||
if not self.options.redirect_logs:
|
if self.options.redirect_logs:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
captured = ""
|
captured = ""
|
||||||
|
@ -216,12 +216,12 @@ class XunitReporter(Reporter):
|
||||||
xml_file = codecs.open(self.tmp_xml_file.name, 'a',
|
xml_file = codecs.open(self.tmp_xml_file.name, 'a',
|
||||||
self.encoding, 'replace')
|
self.encoding, 'replace')
|
||||||
xml_file.write(self._forceUnicode(
|
xml_file.write(self._forceUnicode(
|
||||||
'<testcase name=%(name)s time="%(taken).3f">'
|
'<testcase name=%(name)s time="%(taken).3f">%(systemout)s'
|
||||||
'<failure type=%(errtype)s message=%(message)s>%(logs)s'
|
'<failure type=%(errtype)s message=%(message)s>'
|
||||||
'</failure></testcase>' %
|
'</failure></testcase>' %
|
||||||
{'name': self._quoteattr(test.get_classname() + '.' + test.get_name()),
|
{'name': self._quoteattr(test.get_classname() + '.' + test.get_name()),
|
||||||
'taken': test.time_taken,
|
'taken': test.time_taken,
|
||||||
'logs': self._get_all_logs_data(test),
|
'systemout': self._get_captured(test),
|
||||||
'errtype': self._quoteattr(test.result),
|
'errtype': self._quoteattr(test.result),
|
||||||
'message': self._quoteattr(test.message),
|
'message': self._quoteattr(test.message),
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Reference in a new issue