diff options
author | Viliam Luc <vluc@cisco.com> | 2021-06-25 10:05:28 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2021-08-11 06:00:45 +0000 |
commit | 03bf0dd6ea67ef2b1386733d0b2ce3489c6a7f3e (patch) | |
tree | e23e6c239eb5f1b47cb5c40b4f9028bc11568be4 /resources/tools/presentation/generator_tables.py | |
parent | 476faa27d66a604df8b72d9339668485c0430b3e (diff) |
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 <vluc@cisco.com>
Change-Id: I6c71eb8a8767827e18f88a9a1142b899158a190c
Diffstat (limited to 'resources/tools/presentation/generator_tables.py')
-rw-r--r-- | resources/tools/presentation/generator_tables.py | 7 |
1 files changed, 5 insertions, 2 deletions
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) |