aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
authorViliam Luc <vluc@cisco.com>2021-12-14 12:03:33 +0100
committerTibor Frank <tifrank@cisco.com>2021-12-14 13:26:56 +0000
commit6e42b7852dea95ad855ea24a762a6c856fd9c4c4 (patch)
tree53879317940cbccd5d0e265f9bb914d995bf0217 /resources/tools
parent78f9f76edd46859a55b7acf1333560b6f18a638f (diff)
trending: fix broken trending
Signed-off-by: Viliam Luc <vluc@cisco.com> Change-Id: I1ecbfa48f3765884720f0490b9b9da1f69bd2b1a
Diffstat (limited to 'resources/tools')
-rw-r--r--resources/tools/presentation/generator_cpta.py26
1 files changed, 20 insertions, 6 deletions
diff --git a/resources/tools/presentation/generator_cpta.py b/resources/tools/presentation/generator_cpta.py
index 0bef38d82d..2182fe90c2 100644
--- a/resources/tools/presentation/generator_cpta.py
+++ b/resources/tools/presentation/generator_cpta.py
@@ -855,9 +855,16 @@ def _generate_all_charts(spec, input_data):
with open(file_name, u'w') as txt_file:
for test_name, classification in job_data.items():
if classification == u"regression":
- tst = test_name.split(" ")[1].split(".")[1:]
- nic = tst[0].split("-")[0]
- tst_name = f"{nic}-{tst[1]}"
+ if u"2n" in test_name:
+ test_name = test_name.split("-", 2)
+ tst = test_name[2].split(".")[-1]
+ nic = test_name[1]
+ tst_name = f"{nic}-{tst}"
+ else:
+ test_name = test_name.split("-", 1)
+ tst = test_name[1].split(".")[-1]
+ nic = test_name[0].split(".")[-1]
+ tst_name = f"{nic}-{tst}"
for line in data:
if tst_name in line:
@@ -878,9 +885,16 @@ def _generate_all_charts(spec, input_data):
with open(file_name, u'w') as txt_file:
for test_name, classification in job_data.items():
if classification == u"progression":
- tst = test_name.split(" ")[1].split(".")[1:]
- nic = tst[0].split("-")[0]
- tst_name = f"{nic}-{tst[1]}"
+ if u"2n" in test_name:
+ test_name = test_name.split("-", 2)
+ tst = test_name[2].split(".")[-1]
+ nic = test_name[1]
+ tst_name = f"{nic}-{tst}"
+ else:
+ test_name = test_name.split("-", 1)
+ tst = test_name[1].split(".")[-1]
+ nic = test_name[0].split(".")[-1]
+ tst_name = f"{nic}-{tst}"
for line in data:
if tst_name in line: