X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Finput_data_parser.py;h=d23fa8454d7de10f0fefe976490e89465b362801;hp=dac5f19e69ec6745aaa5d694382fe92c18f9af0c;hb=762c67cae040358876e470822ad50a77d4f03c12;hpb=174ad309b359e9b323b97cae0a6877dce33deb5f diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index dac5f19e69..d23fa8454d 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -442,15 +442,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") or \ msg.message.count(u"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)) + 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 +528,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"'")