From 03bf0dd6ea67ef2b1386733d0b2ce3489c6a7f3e Mon Sep 17 00:00:00 2001 From: Viliam Luc Date: Fri, 25 Jun 2021 10:05:28 +0200 Subject: report: indexed error message added to report emails Report emails will contain error message index now. Index assigned to error message is described at the end of report. sample: avf-dot1q-l2bdbasemaclrn-eth-2memif-1dcr 25ge2p1xxv710 64b 2t1c[0] 4t2c[0] 8t4c[0] Legend: [0] - Failed to run 'cli_inband clear runtime' PAPI command on host xxx.xxx.xxx.xxx Signed-off-by: Viliam Luc Change-Id: I6c71eb8a8767827e18f88a9a1142b899158a190c --- resources/tools/presentation/generator_tables.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'resources/tools/presentation/generator_tables.py') diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index 351250a4d2..8b88a52a79 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -25,7 +25,6 @@ from xml.etree import ElementTree as ET from datetime import datetime as dt from datetime import timedelta from copy import deepcopy -from json import loads import plotly.graph_objects as go import plotly.offline as ploff @@ -1375,7 +1374,11 @@ def table_last_failed_tests(table, input_data): if not groups: continue nic = groups.group(0) - failed_tests.append(f"{nic}-{tst_data[u'name']}") + msg = tst_data[u'msg'].replace(u"\n", u"") + msg = re.sub(r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})', + 'xxx.xxx.xxx.xxx', msg) + msg = msg.split(u'Also teardown failed')[0] + failed_tests.append(f"{nic}-{tst_data[u'name']}###{msg}") tbl_list.append(passed) tbl_list.append(failed) tbl_list.append(duration) -- cgit 1.2.3-korg