X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Finput_data_parser.py;h=24a24f669f70c63aeb2203035b74cc7e54a9ee83;hp=2416e057c86106c7339c59391b3e56f0fb30602c;hb=dd2b7fc16501f50d12e8330a7bdd541583e4419d;hpb=670f186c4e04d1f5487c365277017e2294a1fa21 diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index 2416e057c8..24a24f669f 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -291,6 +291,9 @@ class ExecutionChecker(ResultVisitor): REGEX_BMRR = re.compile(r'Maximum Receive Rate trial results' r' in packets per second: \[(.*)\]') + REGEX_RECONF_LOSS = re.compile(r'Packets lost due to reconfig: (\d*)') + REGEX_RECONF_TIME = re.compile(r'Implied time lost: (\d*.\d*)') + REGEX_TC_TAG = re.compile(r'\d+[tT]\d+[cC]') REGEX_TC_NAME_OLD = re.compile(r'-\d+[tT]\d+[cC]-') @@ -802,6 +805,7 @@ class ExecutionChecker(ResultVisitor): groups = re.search(self.REGEX_TC_NAME_OLD, self._test_ID) if not groups: tag_count = 0 + tag_tc = str() for tag in test_result["tags"]: groups = re.search(self.REGEX_TC_TAG, tag) if groups: @@ -830,7 +834,8 @@ class ExecutionChecker(ResultVisitor): "SOAK" in tags or "TCP" in tags or "MRR" in tags or - "BMRR" in tags): + "BMRR" in tags or + "RECONF" in tags): # TODO: Remove when definitely no NDRPDRDISC tests are used: if "NDRDISC" in tags: test_result["type"] = "NDR" @@ -847,6 +852,8 @@ class ExecutionChecker(ResultVisitor): test_result["type"] = "MRR" elif "FRMOBL" in tags or "BMRR" in tags: test_result["type"] = "BMRR" + elif "RECONF" in tags: + test_result["type"] = "RECONF" else: test_result["status"] = "FAIL" self._data["tests"][self._test_ID] = test_result @@ -908,6 +915,18 @@ class ExecutionChecker(ResultVisitor): AvgStdevMetadataFactory.from_data([ float(groups.group(3)) / float(groups.group(1)), ]) + elif test_result["type"] == "RECONF": + test_result["result"] = None + try: + grps_loss = re.search(self.REGEX_RECONF_LOSS, test.message) + grps_time = re.search(self.REGEX_RECONF_TIME, test.message) + test_result["result"] = { + "loss": int(grps_loss.group(1)), + "time": float(grps_time.group(1)) + } + except (AttributeError, IndexError, ValueError, TypeError): + test_result["status"] = "FAIL" + self._data["tests"][self._test_ID] = test_result def end_test(self, test):