Loading tests/codec_be_on_mr_nonselection/test_param_file.py +12 −14 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ from tests.constants import ( MIN_ENC_FILE_LENGTH_DIFF, MIN_ENC_STATS_DIFF, SCRIPTS_DIR, MAX_ENC_DIFF, ) PASSTHROUGH_CONF = [ Loading Loading @@ -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 != "": Loading Loading @@ -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." Loading @@ -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}") Loading Loading @@ -552,7 +550,7 @@ def encode( ref_stats_file = None dut_stats_file = None if update_ref in [1, 2] and not os.path.exists(ref_out_file): if update_ref == 1 or (update_ref == 2 and not os.path.exists(ref_out_file)): check_and_makedir(ref_out_dir) # call REF encoder Loading Loading @@ -714,7 +712,7 @@ def decode( dut_out_file = f"{dut_out_dir}/{output_file}" ref_out_file = f"{ref_out_dir}/{output_file}" if update_ref == 1 or update_ref == 2 and not os.path.exists(ref_out_file): if update_ref == 1 or (update_ref == 2 and not os.path.exists(ref_out_file)): check_and_makedir(ref_out_dir) add_option_list = dec_opts_list if tracefile_dec != "": Loading Loading
tests/codec_be_on_mr_nonselection/test_param_file.py +12 −14 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ from tests.constants import ( MIN_ENC_FILE_LENGTH_DIFF, MIN_ENC_STATS_DIFF, SCRIPTS_DIR, MAX_ENC_DIFF, ) PASSTHROUGH_CONF = [ Loading Loading @@ -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 != "": Loading Loading @@ -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." Loading @@ -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}") Loading Loading @@ -552,7 +550,7 @@ def encode( ref_stats_file = None dut_stats_file = None if update_ref in [1, 2] and not os.path.exists(ref_out_file): if update_ref == 1 or (update_ref == 2 and not os.path.exists(ref_out_file)): check_and_makedir(ref_out_dir) # call REF encoder Loading Loading @@ -714,7 +712,7 @@ def decode( dut_out_file = f"{dut_out_dir}/{output_file}" ref_out_file = f"{ref_out_dir}/{output_file}" if update_ref == 1 or update_ref == 2 and not os.path.exists(ref_out_file): if update_ref == 1 or (update_ref == 2 and not os.path.exists(ref_out_file)): check_and_makedir(ref_out_dir) add_option_list = dec_opts_list if tracefile_dec != "": Loading