X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_cpta.py;h=2182fe90c2893ff22d425d54ae92b24962572b9f;hp=0bef38d82d1f0fc42ba1916348416e7f2be8b36c;hb=6e42b7852dea95ad855ea24a762a6c856fd9c4c4;hpb=78f9f76edd46859a55b7acf1333560b6f18a638f 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: