diff --git a/scripts/parse_mld_xml.py b/scripts/parse_mld_xml.py index 1760b56258695774f90df67a1f6233c94d7bd482..bbc47754ca0c87946c271b66ea957e60a9dd9653 100644 --- a/scripts/parse_mld_xml.py +++ b/scripts/parse_mld_xml.py @@ -15,8 +15,6 @@ if __name__ == '__main__': args = parser.parse_args() xml_report = args.xml_report csv_file = args.csv_file - - mld = {} tree = ElementTree.parse(xml_report) @@ -27,12 +25,11 @@ if __name__ == '__main__': with open(csv_file,'w') as outfile: for testcase in testcases: - failure = testcase.find(".//failure") - if failure is not None: - system_out = testcase.find(".//system-out") + fulltestname = testcase.get('file') + "::" + testcase.get('name') + system_out = testcase.find(".//system-out") + mld_val = 0 + if system_out is not None: for line in system_out.text.split('\n'): if line.startswith('MLD:'): mld_val = float(line.split()[1]) - fulltestname = testcase.get('file') + "::" + testcase.get('name') - mld[fulltestname] = mld_val - outfile.write(fulltestname + ';' + str(mld_val)+'\n') + outfile.write(fulltestname + ';' + str(mld_val)+'\n')