Commit bbecfcaf authored by TYAGIRIS's avatar TYAGIRIS
Browse files

update selection pytest script to not compare bitstream

parent bc030c96
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ def run_check(
    is_ref_creation,
    input_file_num=None,
    keep_files=True,
    compare_bitstream=False,
):
    sampling_rate = 48
    output_mode, options = OUTPUT_MODES_AND_OPTIONS_FOR_EXPERIMENT[experiment]
@@ -162,6 +163,7 @@ def run_check(
    )

    if not is_ref_creation:
        if compare_bitstream:
            if not is_be_to_ref(dut_bitstream):
                pytest.fail(f"Bitstream file differs from reference")

+6 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ def test_p800(
    dut_decoder_frontend,
    update_ref,
    keep_files,
    compare_bitstream,
):
    run_check(
        experiment,
@@ -65,6 +66,7 @@ def test_p800(
        dut_decoder_frontend,
        update_ref == 1,
        keep_files=keep_files,
        compare_bitstream=compare_bitstream,
    )


@@ -82,6 +84,7 @@ def test_bs1534_no_masa(
    dut_decoder_frontend,
    update_ref,
    keep_files,
    compare_bitstream,
):
    category = ""
    run_check(
@@ -96,6 +99,7 @@ def test_bs1534_no_masa(
        update_ref == 1,
        input_file_num=input_file_num,
        keep_files=keep_files,
        compare_bitstream=compare_bitstream,
    )


@@ -116,6 +120,7 @@ def test_bs1534_masa(
    dut_decoder_frontend,
    update_ref,
    keep_files,
    compare_bitstream,
):
    run_check(
        experiment,
@@ -129,4 +134,5 @@ def test_bs1534_masa(
        update_ref == 1,
        input_file_num=input_file_num,
        keep_files=keep_files,
        compare_bitstream=compare_bitstream,
    )
+14 −0
Original line number Diff line number Diff line
@@ -133,6 +133,14 @@ def pytest_addoption(parser):
        " Use --keep_files to prevent these deletions.",
    )
    
    parser.addoption(
        "--compare_bitstream",
        action="store_true",
        help="By default, the IVAS encoded bitstream is not compared with ref."
        " Use --compare_bitstream to compare IVAS encoded bitstream.",
    )
    

    parser.addoption(
        "--selection_be_md5_file",
        type=Path,
@@ -158,6 +166,12 @@ def keep_files(request) -> bool:
    """
    return request.config.option.keep_files

@pytest.fixture(scope="session")
def compare_bitstream(request) -> bool:
    """
    Return indication to compare IVAS encoded bitstream.
    """
    return request.config.option.compare_bitstream

@pytest.fixture(scope="session")
def dut_encoder_path(request) -> str: