diff options
-rw-r--r-- | resources/tools/presentation/generator_alerts.py | 13 | ||||
-rw-r--r-- | resources/tools/presentation/input_data_parser.py | 10 |
2 files changed, 13 insertions, 10 deletions
diff --git a/resources/tools/presentation/generator_alerts.py b/resources/tools/presentation/generator_alerts.py index c6446f80d9..da45d75891 100644 --- a/resources/tools/presentation/generator_alerts.py +++ b/resources/tools/presentation/generator_alerts.py @@ -348,17 +348,20 @@ class Alerting: text = u"" for idx, test_set in enumerate(alert.get(u"include", list())): + test_set_short = u"" + device = u"" try: - test_set_short = re.search( + groups = re.search( re.compile(r'((vpp|dpdk)-\dn-(skx|clx|hsw|tsh|dnv)-.*)'), test_set - ).group(1) + ) + test_set_short = groups.group(1) + device = groups.group(2) except (AttributeError, IndexError): logging.error( f"The test set {test_set} does not include information " f"about test bed. Using empty string instead." ) - test_set_short = u"" build, version, passed, failed, failed_tests = \ self._get_compressed_failed_tests(alert, test_set) if build is None: @@ -376,7 +379,7 @@ class Alerting: text += ( f"\n\n{test_set_short}, {failed} tests failed, {passed} tests " f"passed, CSIT build: {alert[u'urls'][idx]}/{build}, " - f"VPP version: {version}\n\n" + f"{device} version: {version}\n\n" ) class MaxLens(): @@ -427,7 +430,7 @@ class Alerting: gression_hdr = ( f"\n\n{test_set_short}, " f"CSIT build: {alert[u'urls'][idx]}/{build}, " - f"VPP version: {version}\n\n" + f"{device} version: {version}\n\n" ) # Add list of regressions: self._list_gressions(alert, idx, gression_hdr, u"regressions") diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index 0a6efc7b18..250032e5f9 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -530,8 +530,8 @@ class ExecutionChecker(ResultVisitor): """ if msg.message.count(u"return STDOUT Version:") or \ - msg.message.count(u"VPP Version:") or \ - msg.message.count(u"VPP version:"): + msg.message.count(u"VPP Version:") or \ + msg.message.count(u"VPP version:"): self._version = str(re.search(self.REGEX_VERSION_VPP, msg.message). group(2)) self._data[u"metadata"][u"version"] = self._version @@ -1232,9 +1232,6 @@ class ExecutionChecker(ResultVisitor): test_kw.name.count(u"Show Runtime Counters On All Duts"): self._msg_type = u"test-show-runtime" self._sh_run_counter += 1 - elif test_kw.name.count(u"Install Dpdk Test On All Duts") and \ - not self._version: - self._msg_type = u"dpdk-version" else: return test_kw.messages.visit(self) @@ -1271,6 +1268,9 @@ class ExecutionChecker(ResultVisitor): if setup_kw.name.count(u"Show Vpp Version On All Duts") \ and not self._version: self._msg_type = u"vpp-version" + elif setup_kw.name.count(u"Install Dpdk Framework On All Duts") and \ + not self._version: + self._msg_type = u"dpdk-version" elif setup_kw.name.count(u"Set Global Variable") \ and not self._timestamp: self._msg_type = u"timestamp" |