Commit 0c5f2e1b authored by norvell's avatar norvell
Browse files

Fix parse_mld_xml.py to give MLD=0 for passing test cases

parent 9fa8257a
Loading
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@ if __name__ == '__main__':
    xml_report = args.xml_report
    csv_file   = args.csv_file

    mld = {}

    tree = ElementTree.parse(xml_report)

    testsuite = tree.find(".//testsuite")
@@ -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:
            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')