X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Finput_data_parser.py;h=2f126f4c8be89e2b0de2a6923fe156553b78dc9f;hb=190462e1f242b59d927eff3e63826fe6343eadbc;hp=1177defe35964c08016f3c75c43947db8aca041e;hpb=cbfa26dc0f5334bcd367c161b4eaad342355bbde;p=csit.git diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index 1177defe35..2f126f4c8b 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -404,9 +404,9 @@ class ExecutionChecker(ResultVisitor): else: self._msg_type = None text = re.sub(r"\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} " - r"VAT command history:", u"", msg.message, count=1). \ - replace(u"\n\n", u"\n").replace(u'\n', u' |br| ').\ - replace(u'\r', u'').replace(u'"', u"'") + r"VAT command history:", u"", + msg.message, count=1).replace(u'\n', u' |br| ').\ + replace(u'"', u"'") self._data[u"tests"][self._test_id][u"conf-history"] += ( f" |br| **DUT{str(self._conf_history_lookup_nr)}:** {text}" @@ -427,10 +427,8 @@ class ExecutionChecker(ResultVisitor): self._msg_type = None text = re.sub(r"\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} " r"PAPI command history:", u"", - msg.message, count=1). \ - replace(u"\n\n", u"\n").replace(u'\n', u' |br| ').\ - replace(u'\r', u'').replace(u'"', u"'") - + msg.message, count=1).replace(u'\n', u' |br| ').\ + replace(u'"', u"'") self._data[u"tests"][self._test_id][u"conf-history"] += ( f" |br| **DUT{str(self._conf_history_lookup_nr)}:** {text}" ) @@ -443,14 +441,24 @@ class ExecutionChecker(ResultVisitor): :type msg: Message :returns: Nothing. """ + if u"show-run" not in self._data[u"tests"][self._test_id].keys(): self._data[u"tests"][self._test_id][u"show-run"] = str() - if msg.message.count(u"stats runtime"): - host = str(re.search(self.REGEX_TC_PAPI_CLI, msg.message). - group(1)) - socket = str(re.search(self.REGEX_TC_PAPI_CLI, msg.message). - group(2)) + if msg.message.count(u"stats runtime") or \ + msg.message.count(u"Runtime"): + try: + host = str(re.search(self.REGEX_TC_PAPI_CLI, msg.message). + group(1)) + except (AttributeError, IndexError): + host = self._data[u"tests"][self._test_id][u"show-run"].\ + count(u"DUT:") + 1 + try: + socket = str(re.search(self.REGEX_TC_PAPI_CLI, msg.message). + group(2)) + socket = f"/{socket}" + except (AttributeError, IndexError): + socket = u"" runtime = loads( str(msg.message). replace(u' ', u''). @@ -519,7 +527,7 @@ class ExecutionChecker(ResultVisitor): txt_table.align[u"Vectors/Calls"] = u"r" text += txt_table.get_string(sortby=u"Name") + u'\n' - text = f" \n **DUT: {host}/{socket}** \n {text}".\ + text = f"\n**DUT: {host}{socket}**\n{text}".\ replace(u'\n', u' |br| ').\ replace(u'\r', u'').\ replace(u'"', u"'") @@ -620,7 +628,7 @@ class ExecutionChecker(ResultVisitor): :throws IndexError: If in_str does not have enough substrings. :throws ValueError: If a substring does not convert to float. """ - in_list = in_str.split('/') + in_list = in_str.split('/', 3) rval = { u"min": float(in_list[0]),