Commit 9b4bfb1a authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'basop-ci/fix-enc-stats-in-combination-with-decoder-metrics' into 'main'

[BASOP-CI] fix --enc_stats in combination with decoder-side metrics

See merge request !1870
parents 1493eb53 bb1c4fea
Loading
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ from tests.constants import (
    MIN_ENC_FILE_LENGTH_DIFF,
    MIN_ENC_STATS_DIFF,
    SCRIPTS_DIR,
    MAX_ENC_DIFF,
)

PASSTHROUGH_CONF = [
@@ -256,19 +257,16 @@ def test_param_file_tests(

            print("")
            cmp_result_msg += enc_test_result_msg
            props = parse_properties(cmp_result_msg, False, props_to_record)

            props = parse_properties(cmp_result_msg, False, [MAX_ENC_DIFF])
            for k, v in props.items():
                dut_encoder_frontend.record_property(k, v)

    if encoder_only:
        if enc_test_result:
            pytest.fail("Too high difference in encoder statistics found.")
            else:
                # remove DUT stats file when test result is OK (to save disk space)
                if not keep_files:
                    os.remove(dut_stats_file)

    if encoder_only:
        return  # don't proceed with the decoder if user specified --encoder_only on the command line
        return

    # check for networkSimulator_g192 command line
    if sim_opts != "":
@@ -483,6 +481,9 @@ def test_param_file_tests(
                    print("REF output metadata missing for expected file: " + md_file)
                metadata_differs = True

        if enc_test_result:
            pytest.fail("Too high difference in encoder statistics found.")

        if tracefile_last_rtp_numbers_differ:
            pytest.fail(
                "Last RTP sequence num in tracefiles differ for JBM decoding - Not all frames were decoded in both ref and dut."
@@ -501,9 +502,6 @@ def test_param_file_tests(
                    msg += "metadata only"
                pytest.fail(msg)

        if enc_test_result:
            pytest.fail("Too high difference in encoder statistics found.")

        # remove DUT output files when test result is OK (to save disk space)
        if not keep_files:
            os.remove(f"{dut_base_path}/param_file/dec/{output_file}")