Loading scripts/self_test.py +7 −6 Original line number Diff line number Diff line Loading @@ -194,10 +194,11 @@ class SelfTest(IvasScriptsCommon.IvasScript): default=False, ) self.parser.add_argument( "--dut_fr5", help="Run the decoder under test with 5ms rendering", action="store_true", default=False, "--dut_fr", help="Run the decoder under test with specified render framn size", default=20, choices=[5, 10, 20], type=int ) if shutil.which("valgrind"): self.valgrind = [ Loading Loading @@ -1508,8 +1509,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.decoder_cmdline_options.extend(["-fr", f"{self.args['dut_fr']}"]) test_runner.set_flat_mode_list(run_dict) test_runner.run() self.logger.console(" ") Loading tests/conftest.py +9 −13 Original line number Diff line number Diff line Loading @@ -159,9 +159,11 @@ def pytest_addoption(parser): ) parser.addoption( "--dut_fr5", action="store_true", help="5ms rendering for the DUT output.", "--dut_fr", help="Render frame size for the DUT output.", choices=[5, 10, 20], type=int, default=20, ) @pytest.fixture(scope="session", autouse=True) Loading Loading @@ -398,14 +400,14 @@ def dut_decoder_path(request) -> str: class DecoderFrontend: def __init__(self, path, dec_type, timeout=None, fr5=None) -> None: def __init__(self, path, dec_type, timeout=None, fr=20) -> None: self._path = path self._type = dec_type self.returncode = None self.stdout = None self.stderr = None self.timeout = timeout self.fr5 = fr5 self.fr = fr def run( self, Loading @@ -423,8 +425,7 @@ class DecoderFrontend: if quiet_mode: command.extend(["-q"]) if self.fr5 is not None: command.extend(["-fr", "5"]) command.extend(["-fr", str(self.fr)]) if plc_file is not None: Loading Loading @@ -512,13 +513,8 @@ 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"), fr5=fr5 dut_decoder_path, "DUT", timeout=request.config.getoption("--testcase_timeout"), fr=request.config.option.dut_fr ) yield decoder Loading .gitlab-ci.yml +1 −1 File changed.Contains only whitespace changes. Show changes Loading
scripts/self_test.py +7 −6 Original line number Diff line number Diff line Loading @@ -194,10 +194,11 @@ class SelfTest(IvasScriptsCommon.IvasScript): default=False, ) self.parser.add_argument( "--dut_fr5", help="Run the decoder under test with 5ms rendering", action="store_true", default=False, "--dut_fr", help="Run the decoder under test with specified render framn size", default=20, choices=[5, 10, 20], type=int ) if shutil.which("valgrind"): self.valgrind = [ Loading Loading @@ -1508,8 +1509,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.decoder_cmdline_options.extend(["-fr", f"{self.args['dut_fr']}"]) test_runner.set_flat_mode_list(run_dict) test_runner.run() self.logger.console(" ") Loading
tests/conftest.py +9 −13 Original line number Diff line number Diff line Loading @@ -159,9 +159,11 @@ def pytest_addoption(parser): ) parser.addoption( "--dut_fr5", action="store_true", help="5ms rendering for the DUT output.", "--dut_fr", help="Render frame size for the DUT output.", choices=[5, 10, 20], type=int, default=20, ) @pytest.fixture(scope="session", autouse=True) Loading Loading @@ -398,14 +400,14 @@ def dut_decoder_path(request) -> str: class DecoderFrontend: def __init__(self, path, dec_type, timeout=None, fr5=None) -> None: def __init__(self, path, dec_type, timeout=None, fr=20) -> None: self._path = path self._type = dec_type self.returncode = None self.stdout = None self.stderr = None self.timeout = timeout self.fr5 = fr5 self.fr = fr def run( self, Loading @@ -423,8 +425,7 @@ class DecoderFrontend: if quiet_mode: command.extend(["-q"]) if self.fr5 is not None: command.extend(["-fr", "5"]) command.extend(["-fr", str(self.fr)]) if plc_file is not None: Loading Loading @@ -512,13 +513,8 @@ 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"), fr5=fr5 dut_decoder_path, "DUT", timeout=request.config.getoption("--testcase_timeout"), fr=request.config.option.dut_fr ) yield decoder Loading