Fix: Add prefix to elements of output-perf-xml 15/4615/2
authorpmikus <pmikus@cisco.com>
Tue, 10 Jan 2017 07:06:23 +0000 (08:06 +0100)
committerPeter Mikus <pmikus@cisco.com>
Tue, 10 Jan 2017 08:23:23 +0000 (08:23 +0000)
Robot results parser is using names of suites to create XML with
performance data. This patch is supposed to fix the situation when
the name of suite starts with digit. This leads to issue that
final XML is not valid.

Change-Id: I0046da4ff62f661de07f8e659ae511610c8c61f8
Signed-off-by: pmikus <pmikus@cisco.com>
resources/tools/robot_output_parser.py

index fb08598..d5e9b88 100755 (executable)
@@ -92,7 +92,7 @@ class ExecutionChecker(ResultVisitor):
                 for tag in test.tags:
                     tags.append(tag)
                 test_elem = ET.SubElement(self.root,
-                                          test.parent.name.replace(" ", ""))
+                                          "S"+test.parent.name.replace(" ", ""))
                 test_elem.attrib['name'] = test.parent.name
                 test_elem.attrib['framesize'] = str(re.search(\
                     self.tc_regexp, test.name).group(2))