diff options
author | Tibor Frank <tifrank@cisco.com> | 2020-02-25 11:57:07 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2020-02-25 10:59:22 +0000 |
commit | 6cec6f6777286dc5a09dafc8e8829d55fc799779 (patch) | |
tree | 2d8850d9737a676cfe32d7afadbb7d9c3acd08a3 /resources | |
parent | 745f10ae11f3bfad996007db866f0d6439bc15bf (diff) |
Report: Process test msg
Change-Id: I3b40fb7f6949c098612b5649b56448bca1966155
Signed-off-by: Tibor Frank <tifrank@cisco.com>
(cherry picked from commit bb17ef2ed01e4dd1448c65f6df0d117b73e18dc0)
Diffstat (limited to 'resources')
-rw-r--r-- | resources/tools/presentation/input_data_parser.py | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index e4a7a0a180..d81a453905 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -974,13 +974,24 @@ class ExecutionChecker(ResultVisitor): replace(u'\r', u'').\ replace(u'[', u' |br| [').\ replace(u' |br| [', u'[', 1) - test_result[u"msg"] = test.message.\ - replace(u'\n', u' |br| ').\ - replace(u'\r', u'').\ - replace(u'"', u"'") test_result[u"type"] = u"FUNC" test_result[u"status"] = test.status + if test.status == u"PASS": + if u"NDRPDR" in tags: + test_result[u"msg"] = self._get_data_from_perf_test_msg( + test.message).replace(u'\n', u' |br| ').\ + replace(u'\r', u'').replace(u'"', u"'") + elif u"MRR" in tags or u"FRMOBL" in tags or u"BMRR" in tags: + test_result[u"msg"] = self._get_data_from_mrr_test_msg( + test.message).replace(u'\n', u' |br| ').\ + replace(u'\r', u'').replace(u'"', u"'") + else: + test_result[u"msg"] = test.message.replace(u'\n', u' |br| ').\ + replace(u'\r', u'').replace(u'"', u"'") + else: + test_result[u"msg"] = u"Test Failed." + if u"PERFTEST" in tags: # Replace info about cores (e.g. -1c-) with the info about threads # and cores (e.g. -1t1c-) in the long test case names and in the @@ -996,14 +1007,14 @@ class ExecutionChecker(ResultVisitor): tag_tc = tag if tag_count == 1: - self._test_id = re.sub(self.REGEX_TC_NAME_NEW, - f"-{tag_tc.lower()}-", - self._test_id, - count=1) - test_result[u"name"] = re.sub(self.REGEX_TC_NAME_NEW, - f"-{tag_tc.lower()}-", - test_result["name"], - count=1) + self._test_id = re.sub( + self.REGEX_TC_NAME_NEW, f"-{tag_tc.lower()}-", + self._test_id, count=1 + ) + test_result[u"name"] = re.sub( + self.REGEX_TC_NAME_NEW, f"-{tag_tc.lower()}-", + test_result["name"], count=1 + ) else: test_result[u"status"] = u"FAIL" self._data[u"tests"][self._test_id] = test_result @@ -1016,11 +1027,6 @@ class ExecutionChecker(ResultVisitor): if test.status == u"PASS": if u"NDRPDR" in tags: - test_result[u"msg"] = self._get_data_from_perf_test_msg( - test.message). \ - replace(u'\n', u' |br| '). \ - replace(u'\r', u''). \ - replace(u'"', u"'") test_result[u"type"] = u"NDRPDR" test_result[u"throughput"], test_result[u"status"] = \ self._get_ndrpdr_throughput(test.message) @@ -1035,11 +1041,6 @@ class ExecutionChecker(ResultVisitor): groups = re.search(self.REGEX_TCP, test.message) test_result[u"result"] = int(groups.group(2)) elif u"MRR" in tags or u"FRMOBL" in tags or u"BMRR" in tags: - test_result[u"msg"] = self._get_data_from_mrr_test_msg( - test.message). \ - replace(u'\n', u' |br| '). \ - replace(u'\r', u''). \ - replace(u'"', u"'") if u"MRR" in tags: test_result[u"type"] = u"MRR" else: |