Commit bb90cbc0 authored by norvell's avatar norvell
Browse files

Merge branch 'main' into basop-ci-branch

parents 855ee966 8bd108ed
Loading
Loading
Loading
Loading
+21 −5
Original line number Diff line number Diff line
@@ -28,13 +28,14 @@ if __name__ == "__main__":
    tree = ElementTree.parse(xml_report)

    testsuite = tree.find(".//testsuite")
    print(
        f"Found testsuite with {testsuite.get('tests')} tests and {testsuite.get('failures')} failures."
    )


    testcases = tree.findall(".//testcase")
    
    results_unsorted = {}
    passes = 0
    failures = 0
    errors = 0

    for testcase in testcases:
        if testcase.find(".//skipped") is None:
@@ -51,14 +52,29 @@ if __name__ == "__main__":
                p.get("name"): p.get("value")
                for p in testcase.findall(".//property")
            }

            if testcase.find('failure') is not None:
                testresult = 'FAIL'
                failures = failures + 1
            elif testcase.find('error') is not None:
                testresult = 'ERROR'
                errors = errors + 1
            else:
                testresult = 'PASS'
                passes = passes + 1

            properties_values = [str(properties_found.get(p)) for p in PROPERTIES]
            outline = ";".join([fulltestname] + properties_values) + "\n"
            outline = ";".join([fulltestname,testresult] + properties_values) + "\n"
            results_unsorted[fulltestname] = outline

    results_sorted = dict(sorted(results_unsorted.items()))

    with open(csv_file, "w") as outfile:
        headerline = ";".join(["testcase"] + PROPERTIES) + "\n"
        headerline = ";".join(["testcase","Result"] + PROPERTIES) + "\n"
        outfile.write(headerline)
        for test in results_sorted:
            outfile.write(results_sorted[test])

    print(
        f"Parsed testsuite with {passes+failures+errors} tests: {passes} passes, {failures} failures and {errors} errors."
    )
+5 −1
Original line number Diff line number Diff line
@@ -44,7 +44,11 @@ def cmp_pcm(file1, file2, out_config, fs, get_mld=False, mld_lim=0, abs_tol=0) -
            f"file size in samples: file 1 = {s1.shape[0]},",
            f"file 2 = {s2.shape[0]}",
        )
        return 1, "FAIL: File lengths differ"
        reason = "FAIL: File lengths differ. MAXIMUM ABS DIFF: None"
        if get_mld:
            reason += " - MLD: None"

        return 1, reason

    cmp_result = pyaudio3dtools.audioarray.compare(
        s1, s2, fs, per_frame=False, get_mld=get_mld