diff options
Diffstat (limited to 'resources/tools/presentation/generator_alerts.py')
-rw-r--r-- | resources/tools/presentation/generator_alerts.py | 13 |
1 files changed, 8 insertions, 5 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") |