Loading .gitlab-ci.yml +37 −7 Original line number Diff line number Diff line Loading @@ -201,7 +201,23 @@ stages: - make clean - make -j CLANG=$CLANG_NUM - testcase_timeout=$SELFTEST_SANITY_TIMEOUT - UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1 python3 -m pytest $SELF_TEST_PRM_FILE -v --update_ref 1 -m create_ref --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - export UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1 - exit_code20=0 - exit_code10=0 - exit_code5=0 - if [ $CLANG_NUM -eq 1 ]; then sanitizer_type="MemorySanitizer"; elif [ $CLANG_NUM -eq 2 ]; then sanitizer_type="AddressSanitizer"; elif [ $CLANG_NUM -eq 3 ]; then sanitizer_type="UndefinedBehaviorSanitizer"; else echo "Wrong CLANG_NUM $CLANG_NUM given!"; exit 1; fi # run encoder and decoder with 20ms renderer framesize first, use reference creation mode - python3 -m pytest $SELF_TEST_PRM_FILE -v --update_ref 1 -m create_ref --html=report-20ms.html --self-contained-html --junit-xml=report-junit-20ms.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code20=$? # for 10ms and 5ms renderer framesize, we only need to run the decoder part as renderer framesize is a decoder-only option # set tolerance very high do ignore any BE differences due to the different renderer framesizes, those can appear due to the limiter being active # we are only interested in runtime errors from the sanitizers and ignore the diffs - python3 -m pytest $SELF_TEST_PRM_FILE -v --html=report-5ms.html --self-contained-html --junit-xml=report-junit-5ms.xml --dut_fr 5 --decoder_only --abs_tol 100000 || exit_code5=$? - python3 -m pytest $SELF_TEST_PRM_FILE -v --html=report-10ms.html --self-contained-html --junit-xml=report-junit-10ms.xml --dut_fr 10 --decoder_only --abs_tol 100000 || exit_code10=$? - if [ $exit_code20 -ne 0 ] || [ $exit_code10 -ne 0 ] || [ $exit_code5 -ne 0 ]; then exit 1; fi # --------------------------------------------------------------- Loading Loading @@ -283,12 +299,18 @@ stages: expire_in: 1 week when: always paths: - report-junit.xml - report.html - report-junit-20ms.xml - report-junit-10ms.xml - report-junit-5ms.xml - report-20ms.html - report-10ms.html - report-5ms.html expose_as: "Sanitizer selftest results" reports: junit: - report-junit.xml - report-junit-20ms.xml - report-junit-10ms.xml - report-junit-5ms.xml .sanitizer-selftest-ltv: stage: test Loading @@ -299,12 +321,18 @@ stages: expire_in: 2 week when: always paths: - report-junit.xml - report.html - report-junit-20ms.xml - report-junit-10ms.xml - report-junit-5ms.xml - report-20ms.html - report-10ms.html - report-5ms.html expose_as: "Sanitizer selftest results" reports: junit: - report-junit.xml - report-junit-20ms.xml - report-junit-10ms.xml - report-junit-5ms.xml # --------------------------------------------------------------- # .pre jobs for setting up things Loading Loading @@ -1511,6 +1539,8 @@ ltv-usan: paths: - ep_015.g192 - dly_profile.dat - head_rot_traj.csv - exof_traj.csv - ./LOGS_PLC - ./LOGS_noPLC Loading ci/complexity_measurements/mergeNewsletterRam.py +0 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. import csv import re import sys newsletterFilename = "" Loading ci/complexity_measurements/mergeNewsletterRom.py +0 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. import csv import re import sys newsletterFilename = "" Loading ci/create_trajectories.py 0 → 100644 +25 −0 Original line number Diff line number Diff line import numpy as np FRAMES_PER_SEC = 50 def random_trajectory(duration_sec): n_frames = int(FRAMES_PER_SEC * duration_sec) trj = np.random.random((n_frames, 4)) trj[:, 0] = -3 trj[:, 1] *= 180 trj[:, 2] *= 90 trj[:, 3] *= 180 return trj def constant_trajectory(duration_sec, yaw=0, pitch=0, roll=0): n_frames = int(FRAMES_PER_SEC * duration_sec) trj = np.empty((n_frames, 4)) trj[:, 0] = -3 trj[:, 1] = yaw trj[:, 2] = pitch trj[:, 3] = roll return trj ci/run_scheduled_sanitizer_test.py +41 −6 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import argparse import pathlib import subprocess import sys import numpy as np import json CI_SCRIPT_DIR = "./ci" sys.path.append(CI_SCRIPT_DIR) Loading @@ -41,6 +43,8 @@ from collect_artifacts import ( find_failed_files_for_sanitizer_test, ) from combine_genpatt_and_jbm_profile import combine_error_profiles from create_trajectories import random_trajectory SCRIPT_DIR = pathlib.Path("./scripts").resolve() DURATION = "120" Loading @@ -54,12 +58,23 @@ N_FRAMES_DLY_PROFILE = 7500 GENPATT_CMD = f"gen-patt -tailstat -fer -g192 -gamma 0 -rate 0.15 -tol 0.001 -reset -n {N_FRAMES_DLY_PROFILE} {EP_FILE}" MC_MODES = ["5_1", "5_1_2", "5_1_4", "7_1", "7_1_4"] AMBISONICS_MODES = ["HOA3", "HOA2", "FOA", "PlanarHOA3", "PlanarHOA2", "PlanarFOA"] TIMEOUT = ( 60 * 20 ) # timeout of 15 minutes per en/decoding to safeguard against endless loops # timeout of 15 minutes per en/decoding to safeguard against endless loops TIMEOUT = 60 * 20 HEAD_TRAJ_FILE = str(pathlib.Path("./head_rot_traj.csv").resolve()) EXOF_TRAJ_FILE = str(pathlib.Path("./exof_traj.csv").resolve()) CONSOLE_OUT_FILE = "output_san.txt" HEAD_ROT_ARGS = ["-t", HEAD_TRAJ_FILE] EXOF_ARGS = ["-exof", EXOF_TRAJ_FILE] OTR_ARGS = ["-otr", "avg"] BINAURAL_OUT_ARGS = HEAD_ROT_ARGS + EXOF_ARGS + OTR_ARGS ARGS_FOR_OC = { "BINAURAL": BINAURAL_OUT_ARGS, "BINAURAL_ROOM_IR": BINAURAL_OUT_ARGS, "BINAURAL_ROOM_REVERB": BINAURAL_OUT_ARGS, } def main(args): in_format = args.in_format Loading Loading @@ -112,6 +127,12 @@ def get_modes(in_format: str) -> list: return mode_list def assemble_oc_dict(out_formats: list): oc_dict = {of: ARGS_FOR_OC.get(of, list()) for of in out_formats} return json.dumps(oc_dict) def get_md_file_command(in_format: str) -> list: cmd = list() Loading @@ -127,11 +148,19 @@ def get_md_file_command(in_format: str) -> list: def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = True): modes = get_modes(in_format) md_file_command = get_md_file_command(in_format) if len(modes) == 0: return 0 md_file_command = get_md_file_command(in_format) oc_str = assemble_oc_dict(out_formats) # create random trajectory files if "BINAURAL" in oc_str: trajectory_files = [HEAD_TRAJ_FILE, EXOF_TRAJ_FILE] for tf in trajectory_files: traj = random_trajectory(int(DURATION)) np.savetxt(tf, traj, fmt="%.2f", delimiter=",") ### always run encoder and decoder with no frameloss cmd_no_fec = [ str(SCRIPT_DIR.joinpath("IvasBuildAndRunChecks.py")), Loading @@ -146,7 +175,7 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr "-m", *modes, "--oc", *out_formats, oc_str, *md_file_command, "--usan_supp_file", USAN_SUPP_FILE, Loading @@ -154,6 +183,12 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr str(TIMEOUT), ] # to test non-diegetic panning with mono decoding: # resue decoder part of StereDmxEVS mode (it is basically a duplicate of "normal" mono run) if in_format == "StereoDmxEVS": panning = np.random.randint(-90, 91) cmd_no_fec += [f'-D=-non_diegetic_pan {panning}'] print( "======== Script command line WITHOUT plc: ========\n{}".format( " ".join(cmd_no_fec) Loading Loading
.gitlab-ci.yml +37 −7 Original line number Diff line number Diff line Loading @@ -201,7 +201,23 @@ stages: - make clean - make -j CLANG=$CLANG_NUM - testcase_timeout=$SELFTEST_SANITY_TIMEOUT - UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1 python3 -m pytest $SELF_TEST_PRM_FILE -v --update_ref 1 -m create_ref --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - export UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1 - exit_code20=0 - exit_code10=0 - exit_code5=0 - if [ $CLANG_NUM -eq 1 ]; then sanitizer_type="MemorySanitizer"; elif [ $CLANG_NUM -eq 2 ]; then sanitizer_type="AddressSanitizer"; elif [ $CLANG_NUM -eq 3 ]; then sanitizer_type="UndefinedBehaviorSanitizer"; else echo "Wrong CLANG_NUM $CLANG_NUM given!"; exit 1; fi # run encoder and decoder with 20ms renderer framesize first, use reference creation mode - python3 -m pytest $SELF_TEST_PRM_FILE -v --update_ref 1 -m create_ref --html=report-20ms.html --self-contained-html --junit-xml=report-junit-20ms.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code20=$? # for 10ms and 5ms renderer framesize, we only need to run the decoder part as renderer framesize is a decoder-only option # set tolerance very high do ignore any BE differences due to the different renderer framesizes, those can appear due to the limiter being active # we are only interested in runtime errors from the sanitizers and ignore the diffs - python3 -m pytest $SELF_TEST_PRM_FILE -v --html=report-5ms.html --self-contained-html --junit-xml=report-junit-5ms.xml --dut_fr 5 --decoder_only --abs_tol 100000 || exit_code5=$? - python3 -m pytest $SELF_TEST_PRM_FILE -v --html=report-10ms.html --self-contained-html --junit-xml=report-junit-10ms.xml --dut_fr 10 --decoder_only --abs_tol 100000 || exit_code10=$? - if [ $exit_code20 -ne 0 ] || [ $exit_code10 -ne 0 ] || [ $exit_code5 -ne 0 ]; then exit 1; fi # --------------------------------------------------------------- Loading Loading @@ -283,12 +299,18 @@ stages: expire_in: 1 week when: always paths: - report-junit.xml - report.html - report-junit-20ms.xml - report-junit-10ms.xml - report-junit-5ms.xml - report-20ms.html - report-10ms.html - report-5ms.html expose_as: "Sanitizer selftest results" reports: junit: - report-junit.xml - report-junit-20ms.xml - report-junit-10ms.xml - report-junit-5ms.xml .sanitizer-selftest-ltv: stage: test Loading @@ -299,12 +321,18 @@ stages: expire_in: 2 week when: always paths: - report-junit.xml - report.html - report-junit-20ms.xml - report-junit-10ms.xml - report-junit-5ms.xml - report-20ms.html - report-10ms.html - report-5ms.html expose_as: "Sanitizer selftest results" reports: junit: - report-junit.xml - report-junit-20ms.xml - report-junit-10ms.xml - report-junit-5ms.xml # --------------------------------------------------------------- # .pre jobs for setting up things Loading Loading @@ -1511,6 +1539,8 @@ ltv-usan: paths: - ep_015.g192 - dly_profile.dat - head_rot_traj.csv - exof_traj.csv - ./LOGS_PLC - ./LOGS_noPLC Loading
ci/complexity_measurements/mergeNewsletterRam.py +0 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. import csv import re import sys newsletterFilename = "" Loading
ci/complexity_measurements/mergeNewsletterRom.py +0 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. import csv import re import sys newsletterFilename = "" Loading
ci/create_trajectories.py 0 → 100644 +25 −0 Original line number Diff line number Diff line import numpy as np FRAMES_PER_SEC = 50 def random_trajectory(duration_sec): n_frames = int(FRAMES_PER_SEC * duration_sec) trj = np.random.random((n_frames, 4)) trj[:, 0] = -3 trj[:, 1] *= 180 trj[:, 2] *= 90 trj[:, 3] *= 180 return trj def constant_trajectory(duration_sec, yaw=0, pitch=0, roll=0): n_frames = int(FRAMES_PER_SEC * duration_sec) trj = np.empty((n_frames, 4)) trj[:, 0] = -3 trj[:, 1] = yaw trj[:, 2] = pitch trj[:, 3] = roll return trj
ci/run_scheduled_sanitizer_test.py +41 −6 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import argparse import pathlib import subprocess import sys import numpy as np import json CI_SCRIPT_DIR = "./ci" sys.path.append(CI_SCRIPT_DIR) Loading @@ -41,6 +43,8 @@ from collect_artifacts import ( find_failed_files_for_sanitizer_test, ) from combine_genpatt_and_jbm_profile import combine_error_profiles from create_trajectories import random_trajectory SCRIPT_DIR = pathlib.Path("./scripts").resolve() DURATION = "120" Loading @@ -54,12 +58,23 @@ N_FRAMES_DLY_PROFILE = 7500 GENPATT_CMD = f"gen-patt -tailstat -fer -g192 -gamma 0 -rate 0.15 -tol 0.001 -reset -n {N_FRAMES_DLY_PROFILE} {EP_FILE}" MC_MODES = ["5_1", "5_1_2", "5_1_4", "7_1", "7_1_4"] AMBISONICS_MODES = ["HOA3", "HOA2", "FOA", "PlanarHOA3", "PlanarHOA2", "PlanarFOA"] TIMEOUT = ( 60 * 20 ) # timeout of 15 minutes per en/decoding to safeguard against endless loops # timeout of 15 minutes per en/decoding to safeguard against endless loops TIMEOUT = 60 * 20 HEAD_TRAJ_FILE = str(pathlib.Path("./head_rot_traj.csv").resolve()) EXOF_TRAJ_FILE = str(pathlib.Path("./exof_traj.csv").resolve()) CONSOLE_OUT_FILE = "output_san.txt" HEAD_ROT_ARGS = ["-t", HEAD_TRAJ_FILE] EXOF_ARGS = ["-exof", EXOF_TRAJ_FILE] OTR_ARGS = ["-otr", "avg"] BINAURAL_OUT_ARGS = HEAD_ROT_ARGS + EXOF_ARGS + OTR_ARGS ARGS_FOR_OC = { "BINAURAL": BINAURAL_OUT_ARGS, "BINAURAL_ROOM_IR": BINAURAL_OUT_ARGS, "BINAURAL_ROOM_REVERB": BINAURAL_OUT_ARGS, } def main(args): in_format = args.in_format Loading Loading @@ -112,6 +127,12 @@ def get_modes(in_format: str) -> list: return mode_list def assemble_oc_dict(out_formats: list): oc_dict = {of: ARGS_FOR_OC.get(of, list()) for of in out_formats} return json.dumps(oc_dict) def get_md_file_command(in_format: str) -> list: cmd = list() Loading @@ -127,11 +148,19 @@ def get_md_file_command(in_format: str) -> list: def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = True): modes = get_modes(in_format) md_file_command = get_md_file_command(in_format) if len(modes) == 0: return 0 md_file_command = get_md_file_command(in_format) oc_str = assemble_oc_dict(out_formats) # create random trajectory files if "BINAURAL" in oc_str: trajectory_files = [HEAD_TRAJ_FILE, EXOF_TRAJ_FILE] for tf in trajectory_files: traj = random_trajectory(int(DURATION)) np.savetxt(tf, traj, fmt="%.2f", delimiter=",") ### always run encoder and decoder with no frameloss cmd_no_fec = [ str(SCRIPT_DIR.joinpath("IvasBuildAndRunChecks.py")), Loading @@ -146,7 +175,7 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr "-m", *modes, "--oc", *out_formats, oc_str, *md_file_command, "--usan_supp_file", USAN_SUPP_FILE, Loading @@ -154,6 +183,12 @@ def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = Tr str(TIMEOUT), ] # to test non-diegetic panning with mono decoding: # resue decoder part of StereDmxEVS mode (it is basically a duplicate of "normal" mono run) if in_format == "StereoDmxEVS": panning = np.random.randint(-90, 91) cmd_no_fec += [f'-D=-non_diegetic_pan {panning}'] print( "======== Script command line WITHOUT plc: ========\n{}".format( " ".join(cmd_no_fec) Loading