diff --git a/tests/codec_be_on_mr_nonselection/test_param_file.py b/tests/codec_be_on_mr_nonselection/test_param_file.py index 998e5e0a08bc4c2ab316988a653ec335bdd7ae03..9fe43a40b21677cbf2560b39ada3d2d126064ecf 100644 --- a/tests/codec_be_on_mr_nonselection/test_param_file.py +++ b/tests/codec_be_on_mr_nonselection/test_param_file.py @@ -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 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 + if enc_test_result: + pytest.fail("Too high difference in encoder statistics found.") + + 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}")