X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Frobot_output_parser.py;h=171a66fab355e2485ecb658f69f7b0f1d9def40e;hp=d5e9b88597e889487689398ecfcaf6515209afa5;hb=6a00ab3009930ba06bb2b28118398d8f232be4b9;hpb=6eda6928faa746c7e012827296f17fc364cde1b3 diff --git a/resources/tools/robot_output_parser.py b/resources/tools/robot_output_parser.py index d5e9b88597..171a66fab3 100755 --- a/resources/tools/robot_output_parser.py +++ b/resources/tools/robot_output_parser.py @@ -27,13 +27,15 @@ from robot.api import ExecutionResult, ResultVisitor class ExecutionChecker(ResultVisitor): """Iterates through test cases.""" - tc_regexp = re.compile(ur'^TC\d+:\s((\d+)B|IMIX_v4_1)[\D\d]+\s(\d)'\ - '(thread|threads)\\s(\\d)(core|cores)\\s(\\d)(rxq|rxqs)') + tc_regexp = re.compile(ur'^tc\d+-((\d+)B|IMIX)-(\d)t(\d)c-(.*)') rate_regexp = re.compile(ur'^[\D\d]*FINAL_RATE:\s(\d+\.\d+)[\D\d]*') lat_regexp = re.compile(ur'^[\D\d]*'\ - 'LAT_\\d+%NDR:\\s\\[\'(\\d+\\/\\d+\\/\\d+)\',\\s\'(\\d+\\/\\d+\\/\\d+)\'\\]\\s\n'\ - 'LAT_\\d+%NDR:\\s\\[\'(\\d+\\/\\d+\\/\\d+)\',\\s\'(\\d+\\/\\d+\\/\\d+)\'\\]\\s\n'\ - 'LAT_\\d+%NDR:\\s\\[\'(\\d+\\/\\d+\\/\\d+)\',\\s\'(\\d+\\/\\d+\\/\\d+)\'\\]') + ur'LAT_\d+%NDR:\s\[\'(-?\d+\/-?\d+\/-?\d+)\','\ + ur'\s\'(-?\d+\/-?\d+\/-?\d+)\'\]\s\n'\ + ur'LAT_\d+%NDR:\s\[\'(-?\d+\/-?\d+\/-?\d+)\','\ + ur'\s\'(-?\d+\/-?\d+\/-?\d+)\'\]\s\n'\ + ur'LAT_\d+%NDR:\s\[\'(-?\d+\/-?\d+\/-?\d+)\','\ + ur'\s\'(-?\d+\/-?\d+\/-?\d+)\'\]') def __init__(self, args): self.root = ET.Element('build', @@ -86,7 +88,7 @@ class ExecutionChecker(ResultVisitor): :type test: Test :return: Nothing. """ - if any("PERFTEST_LONG" in tag for tag in test.tags): + if any("NDRPDRDISC" in tag for tag in test.tags): if test.status == 'PASS': tags = [] for tag in test.tags: @@ -95,11 +97,21 @@ class ExecutionChecker(ResultVisitor): "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)) - test_elem.attrib['workerthreads'] = str(re.search(\ + self.tc_regexp, test.name).group(1)) + test_elem.attrib['threads'] = str(re.search(\ self.tc_regexp, test.name).group(3)) - test_elem.attrib['workerspernic'] = str(re.search(\ - self.tc_regexp, test.name).group(7)) + test_elem.attrib['cores'] = str(re.search(\ + self.tc_regexp, test.name).group(4)) + if any("NDRDISC" in tag for tag in test.tags): + test_elem.attrib['lat_100'] = str(re.search(\ + self.lat_regexp, test.message).group(1)) + '/' +\ + str(re.search(self.lat_regexp, test.message).group(2)) + test_elem.attrib['lat_50'] = str(re.search(\ + self.lat_regexp, test.message).group(3)) + '/' +\ + str(re.search(self.lat_regexp, test.message).group(4)) + test_elem.attrib['lat_10'] = str(re.search(\ + self.lat_regexp, test.message).group(5)) + '/' +\ + str(re.search(self.lat_regexp, test.message).group(6)) test_elem.attrib['tags'] = ', '.join(tags) test_elem.text = str(re.search(\ self.rate_regexp, test.message).group(1))