aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/input_data_parser.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2020-02-25 11:57:07 +0100
committerTibor Frank <tifrank@cisco.com>2020-02-25 11:57:07 +0100
commitbb17ef2ed01e4dd1448c65f6df0d117b73e18dc0 (patch)
treee650ba8d5aeea0641dc6589833baf2ad8b1eed9a /resources/tools/presentation/input_data_parser.py
parent84ab8bd624aa016988fc9f56e5a07e9ec07128b5 (diff)
Report: Process test msg
Change-Id: I3b40fb7f6949c098612b5649b56448bca1966155 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/input_data_parser.py')
-rw-r--r--resources/tools/presentation/input_data_parser.py45
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: