Loading .gitlab-ci.yml +32 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,10 @@ stages: - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*SPLIT_REND_WITH_HEAD_ROT\)[[:space:]]*\*\//\1/g" ./lib_com/options.h - sed -i.bak -e "s/\/\/[[:space:]]*\(#define[[:space:]]*SPLIT_REND_WITH_HEAD_ROT\)/\1/g" ./lib_com/options.h .disable-limiter: &disable-limiter # automatically enable #define DISABLE_LIMITER in options.h, handling both /**/-comment and //-comment - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*DISABLE_LIMITER\)[[:space:]]*\*\//\1/g" ./lib_com/options.h .get-commits-behind-count: &get-commits-behind-count - echo $CI_COMMIT_SHA - echo $CI_MERGE_REQUEST_TARGET_BRANCH_NAME Loading Loading @@ -505,6 +509,34 @@ codec-usan: - scripts/ref/logs/ expose_as: "usan selftest results" # compare bit-exactness between 5ms and 20 on the branch codec-5ms: extends: - .test-job-linux - .rules-merge-request stage: test needs: ["build-codec-linux"] script: - *print-common-info - *disable-limiter - make clean - make -j ### prepare pytest # create short test vectors - python3 tests/create_short_testvectors.py ### run pytest - exit_code=0 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --update_ref 2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec --dut_fr5 || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - *merge-request-comparison-check artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" expire_in: 1 week when: always paths: - scripts/ref/logs/ expose_as: "pytest IVAS 5ms results" # test renderer executable renderer-smoke-test: extends: Loading scripts/self_test.py +8 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,12 @@ class SelfTest(IvasScriptsCommon.IvasScript): action="store_true", default=False, ) self.parser.add_argument( "--dut_fr5", help="Run the decoder under test with 5ms rendering", action="store_true", default=False, ) if shutil.which("valgrind"): self.valgrind = [ "valgrind", Loading Loading @@ -1502,6 +1508,8 @@ class SelfTest(IvasScriptsCommon.IvasScript): enable_logging=True, logger_name="{}.testrunner".format(self.logger.name), ) if self.args["dut_fr5"] is True: test_runner.decoder_cmdline_options.extend(["-fr","5"]) test_runner.set_flat_mode_list(run_dict) test_runner.run() self.logger.console(" ") Loading tests/conftest.py +16 −2 Original line number Diff line number Diff line Loading @@ -158,6 +158,11 @@ def pytest_addoption(parser): help="Run the MLD tool instead of just comparing for bitexactness", ) parser.addoption( "--dut_fr5", action="store_true", help="5ms rendering for the DUT output.", ) @pytest.fixture(scope="session", autouse=True) def update_ref(request): Loading Loading @@ -393,13 +398,14 @@ def dut_decoder_path(request) -> str: class DecoderFrontend: def __init__(self, path, dec_type, timeout=None) -> None: def __init__(self, path, dec_type, timeout=None, fr5=None) -> None: self._path = path self._type = dec_type self.returncode = None self.stdout = None self.stderr = None self.timeout = timeout self.fr5 = fr5 def run( self, Loading @@ -417,6 +423,9 @@ class DecoderFrontend: if quiet_mode: command.extend(["-q"]) if self.fr5 is not None: command.extend(["-fr", "5"]) if plc_file is not None: system = platform.system() Loading Loading @@ -503,8 +512,13 @@ def dut_decoder_frontend(dut_decoder_path, request) -> DecoderFrontend: """ Return a :class:`conftest.DecoderFrontend` instance as DUT for the test session. """ fr5 = None if request.config.option.dut_fr5 is True: fr5 = True decoder = DecoderFrontend( dut_decoder_path, "DUT", timeout=request.config.getoption("--testcase_timeout") dut_decoder_path, "DUT", timeout=request.config.getoption("--testcase_timeout"), fr5=fr5 ) yield decoder Loading Loading
.gitlab-ci.yml +32 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,10 @@ stages: - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*SPLIT_REND_WITH_HEAD_ROT\)[[:space:]]*\*\//\1/g" ./lib_com/options.h - sed -i.bak -e "s/\/\/[[:space:]]*\(#define[[:space:]]*SPLIT_REND_WITH_HEAD_ROT\)/\1/g" ./lib_com/options.h .disable-limiter: &disable-limiter # automatically enable #define DISABLE_LIMITER in options.h, handling both /**/-comment and //-comment - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*DISABLE_LIMITER\)[[:space:]]*\*\//\1/g" ./lib_com/options.h .get-commits-behind-count: &get-commits-behind-count - echo $CI_COMMIT_SHA - echo $CI_MERGE_REQUEST_TARGET_BRANCH_NAME Loading Loading @@ -505,6 +509,34 @@ codec-usan: - scripts/ref/logs/ expose_as: "usan selftest results" # compare bit-exactness between 5ms and 20 on the branch codec-5ms: extends: - .test-job-linux - .rules-merge-request stage: test needs: ["build-codec-linux"] script: - *print-common-info - *disable-limiter - make clean - make -j ### prepare pytest # create short test vectors - python3 tests/create_short_testvectors.py ### run pytest - exit_code=0 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --update_ref 2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec --dut_fr5 || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - *merge-request-comparison-check artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" expire_in: 1 week when: always paths: - scripts/ref/logs/ expose_as: "pytest IVAS 5ms results" # test renderer executable renderer-smoke-test: extends: Loading
scripts/self_test.py +8 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,12 @@ class SelfTest(IvasScriptsCommon.IvasScript): action="store_true", default=False, ) self.parser.add_argument( "--dut_fr5", help="Run the decoder under test with 5ms rendering", action="store_true", default=False, ) if shutil.which("valgrind"): self.valgrind = [ "valgrind", Loading Loading @@ -1502,6 +1508,8 @@ class SelfTest(IvasScriptsCommon.IvasScript): enable_logging=True, logger_name="{}.testrunner".format(self.logger.name), ) if self.args["dut_fr5"] is True: test_runner.decoder_cmdline_options.extend(["-fr","5"]) test_runner.set_flat_mode_list(run_dict) test_runner.run() self.logger.console(" ") Loading
tests/conftest.py +16 −2 Original line number Diff line number Diff line Loading @@ -158,6 +158,11 @@ def pytest_addoption(parser): help="Run the MLD tool instead of just comparing for bitexactness", ) parser.addoption( "--dut_fr5", action="store_true", help="5ms rendering for the DUT output.", ) @pytest.fixture(scope="session", autouse=True) def update_ref(request): Loading Loading @@ -393,13 +398,14 @@ def dut_decoder_path(request) -> str: class DecoderFrontend: def __init__(self, path, dec_type, timeout=None) -> None: def __init__(self, path, dec_type, timeout=None, fr5=None) -> None: self._path = path self._type = dec_type self.returncode = None self.stdout = None self.stderr = None self.timeout = timeout self.fr5 = fr5 def run( self, Loading @@ -417,6 +423,9 @@ class DecoderFrontend: if quiet_mode: command.extend(["-q"]) if self.fr5 is not None: command.extend(["-fr", "5"]) if plc_file is not None: system = platform.system() Loading Loading @@ -503,8 +512,13 @@ def dut_decoder_frontend(dut_decoder_path, request) -> DecoderFrontend: """ Return a :class:`conftest.DecoderFrontend` instance as DUT for the test session. """ fr5 = None if request.config.option.dut_fr5 is True: fr5 = True decoder = DecoderFrontend( dut_decoder_path, "DUT", timeout=request.config.getoption("--testcase_timeout") dut_decoder_path, "DUT", timeout=request.config.getoption("--testcase_timeout"), fr5=fr5 ) yield decoder Loading