Commit b69beaf2 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

fix --filter LEVEL1 TAG ignoring TAG restriction and print filtered test counts

parent bfed7355
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -588,7 +588,7 @@ class MLDConformance:
                )
            else:
                print(f"{pyTestTag} not found in ISAR decoder")
        print("No of tests :")
        print("No of tests (total, before filtering):")
        for tag in testDesciptor.keys():
            print(f"    {tag} : {len(testDesciptor[tag])}")

@@ -1862,9 +1862,11 @@ if __name__ == "__main__":

    if filter_level == "LEVEL1":
        # LEVEL1 baseline: ENC + DEC; REND/ISAR only if explicitly requested.
        # Plain tag_tokens restrict the baseline; +tag_tokens add beyond it.
        if tag_tokens:
            selected_tag_set = set(tag_tokens)
        else:
            selected_tag_set = {"ENC", "DEC"}
        for tag in tag_tokens:
            selected_tag_set.add(tag)
        for tag in tag_add_tokens:
            selected_tag_set.add(tag)
        for tag in tag_remove_tokens:
@@ -1891,6 +1893,12 @@ if __name__ == "__main__":
    conformance = MLDConformance(args)
    conformance.accumulateCommands()

    if testTags or args.filter_display:
        print(f"Selected tests after filtering ({args.filter_display or 'no filter'}):")
        for tag in testTags:
            n = len(conformance.getSelectedTestsForTag(tag))
            print(f"    {tag} : {n}")

    if args.regenerate_enc_refs:
        conformance.runReferenceGeneration(encTag="ISAR_ENC")
        conformance.runReferenceGeneration(encTag="ENC")