mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
validate:tools: Do not duplicated name in the classname in xunit reports
This commit is contained in:
parent
654bacebc9
commit
26e3a9e3c5
3 changed files with 15 additions and 5 deletions
|
@ -138,7 +138,8 @@ class GstValidateManager(TestsManager, Loggable):
|
|||
if config.getboolean("media-info", "is-image") is True:
|
||||
continue
|
||||
for comb in COMBINATIONS:
|
||||
classname = "validate.transcode.to_%s" % (str(comb).replace(' ', '_'))
|
||||
classname = "validate.transcode.to_%s.%s" % (str(comb).replace(' ', '_'),
|
||||
os.path.splitext(os.path.basename(uri))[0].replace(".", "_"))
|
||||
self.tests.append(GstValidateTranscodingTest(classname,
|
||||
self.options,
|
||||
self.reporter,
|
||||
|
|
|
@ -63,6 +63,15 @@ class Test(Loggable):
|
|||
|
||||
return string
|
||||
|
||||
def get_classname(self):
|
||||
name = self.classname.split('.')[-1]
|
||||
classname = self.classname.replace('.%s' % name, '')
|
||||
|
||||
return classname
|
||||
|
||||
def get_name(self):
|
||||
return self.classname.split('.')[-1]
|
||||
|
||||
def add_arguments(self, *args):
|
||||
for arg in args:
|
||||
self.command += " " + arg
|
||||
|
|
|
@ -176,8 +176,8 @@ class XunitReporter(Reporter):
|
|||
'<testcase classname=%(cls)s name=%(name)s time="%(taken).3f">'
|
||||
'<failure type=%(errtype)s message=%(message)s>'
|
||||
'</failure>%(systemout)s</testcase>' %
|
||||
{'cls': self._quoteattr(test.classname),
|
||||
'name': self._quoteattr(test.classname.split('.')[-1]),
|
||||
{'cls': self._quoteattr(test.get_classname()),
|
||||
'name': self._quoteattr(test.get_name()),
|
||||
'taken': test.time_taken,
|
||||
'errtype': self._quoteattr(test.result),
|
||||
'message': self._quoteattr(test.message),
|
||||
|
@ -191,8 +191,8 @@ class XunitReporter(Reporter):
|
|||
self.errorlist.append(
|
||||
'<testcase classname=%(cls)s name=%(name)s '
|
||||
'time="%(taken).3f">%(systemout)s</testcase>' %
|
||||
{'cls': self._quoteattr(test.classname),
|
||||
'name': self._quoteattr(test.classname.split('.')[-1]),
|
||||
{'cls': self._quoteattr(test.get_classname()),
|
||||
'name': self._quoteattr(test.get_name()),
|
||||
'taken': test.time_taken,
|
||||
'systemout': self._get_captured(),
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue