Loading .gitlab-ci.yml +5 −5 Original line number Diff line number Diff line Loading @@ -1080,18 +1080,18 @@ test-be-to-release: # test generating references - echo "generate references" # - ("& python -m pytest .\tests\codec_be_to_accepted_release\encoder --update_ref 1 -n $NPROC | tee 'logs/test_encoder-update_ref-log.txt' ") | Invoke-Expression # - ("& python -m pytest .\tests\codec_be_to_accepted_release\encoder --update_ref 1 -n $NPROC 2>&1 | tee 'logs/test_encoder-update_ref-log.txt' ") | Invoke-Expression # - If($LASTEXITCODE) {("exit $LASTEXITCODE") | Invoke-Expression} # - ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py --update_ref 1 -n $NPROC -x | tee 'logs/test_decoder_constant_bitrate_no_binaural-update_ref-log.txt' ") | Invoke-Expression # - ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py --update_ref 1 -n $NPROC -x 2>&1 | tee 'logs/test_decoder_constant_bitrate_no_binaural-update_ref-log.txt' ") | Invoke-Expression # temporarily test cases that fail # test_decoder_scenebased - ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py::test_decoder_scenebased --update_ref 1 -n $NPROC | tee 'logs/test_decoder_constant_bitrate_no_binaural_test_decoder_scenebased-update_ref-log.txt' ") | Invoke-Expression - If($LASTEXITCODE) {("exit $LASTEXITCODE") | Invoke-Expression} #- ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py::test_decoder_scenebased --update_ref 1 -n $NPROC 2>&1 | tee 'logs/test_decoder_constant_bitrate_no_binaural_test_decoder_scenebased-update_ref-log.txt' ") | Invoke-Expression #- If($LASTEXITCODE) {("exit $LASTEXITCODE") | Invoke-Expression} # test_decoder_combined_formats - ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py::test_decoder_combined_formats --update_ref 1 -n $NPROC | tee 'logs/test_decoder_constant_bitrate_no_binaural_test_decoder_combined_formats-update_ref-log.txt' ") | Invoke-Expression - ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py::test_decoder_combined_formats --update_ref 1 -n $NPROC 2>&1 | tee 'logs/test_decoder_constant_bitrate_no_binaural_test_decoder_combined_formats-update_ref-log.txt' ") | Invoke-Expression - If($LASTEXITCODE) {("exit $LASTEXITCODE") | Invoke-Expression} artifacts: Loading tests/codec_be_to_accepted_release/decoder/__init__.py +1 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,7 @@ def run_check( ref_bitstream, output_path, add_option_list=options, timeout=1, # for testing, to be reviewed ) if not is_ref_creation and not is_be_to_ref(output_path): Loading tests/conftest.py +37 −24 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import logging from pathlib import Path import platform from subprocess import run from subprocess import TimeoutExpired import textwrap from typing import Optional import os Loading Loading @@ -219,6 +220,7 @@ class EncoderFrontend: bypass_mode: Optional[int] = None, quiet_mode: Optional[bool] = True, add_option_list: Optional[list] = None, timeout: Optional[int] = None, ) -> None: command = [self._path] Loading Loading @@ -252,7 +254,8 @@ class EncoderFrontend: cmd_str = textwrap.indent(" ".join(command), prefix="\t") log_dbg_msg(f"{self._type} encoder command:\n{cmd_str}") result = run(command, capture_output=True, check=False) try: result = run(command, capture_output=True, check=False, timeout=timeout) self.returncode = result.returncode self.stderr = result.stderr.decode("ascii") self.stdout = result.stdout.decode("ascii") Loading @@ -264,6 +267,10 @@ class EncoderFrontend: log_dbg_msg(f"{self._type} encoder stderr:\n{stderr_str}") if self.returncode: pytest.fail(f"{self._type} encoder terminated with a non-0 return code: {self.returncode}") except TimeoutExpired as err: log_dbg_msg(f"{self._type} encoder timed stdout:\n{err.stdout}") log_dbg_msg(f"{self._type} encoder timed stderr:\n{err.stderr}") pytest.fail(f"{self._type} encoder timed out") def _check_run(self): if self.returncode is not None: Loading Loading @@ -360,6 +367,7 @@ class DecoderFrontend: quiet_mode: Optional[bool] = True, plc_file: Optional[Path] = None, add_option_list: Optional[list] = None, timeout: Optional[int] = None, ) -> None: command = [self._path] Loading @@ -386,7 +394,8 @@ class DecoderFrontend: cmd_str = textwrap.indent(" ".join(command), prefix="\t") log_dbg_msg(f"{self._type} decoder command:\n{cmd_str}") result = run(command, capture_output=True, check=False) try: result = run(command, capture_output=True, check=False, timeout=timeout) self.returncode = result.returncode self.stderr = result.stderr.decode("ascii") self.stdout = result.stdout.decode("ascii") Loading @@ -398,6 +407,10 @@ class DecoderFrontend: log_dbg_msg(f"{self._type} decoder stderr:\n{stderr_str}") if self.returncode: pytest.fail(f"{self._type} decoder terminated with a non-0 return code: {self.returncode}") except TimeoutExpired as err: log_dbg_msg(f"{self._type} decoder timed stdout:\n{err.stdout}") log_dbg_msg(f"{self._type} decoder timed stderr:\n{err.stderr}") pytest.fail(f"{self._type} decoder timed out") def _check_run(self): if self.returncode is not None: Loading Loading
.gitlab-ci.yml +5 −5 Original line number Diff line number Diff line Loading @@ -1080,18 +1080,18 @@ test-be-to-release: # test generating references - echo "generate references" # - ("& python -m pytest .\tests\codec_be_to_accepted_release\encoder --update_ref 1 -n $NPROC | tee 'logs/test_encoder-update_ref-log.txt' ") | Invoke-Expression # - ("& python -m pytest .\tests\codec_be_to_accepted_release\encoder --update_ref 1 -n $NPROC 2>&1 | tee 'logs/test_encoder-update_ref-log.txt' ") | Invoke-Expression # - If($LASTEXITCODE) {("exit $LASTEXITCODE") | Invoke-Expression} # - ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py --update_ref 1 -n $NPROC -x | tee 'logs/test_decoder_constant_bitrate_no_binaural-update_ref-log.txt' ") | Invoke-Expression # - ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py --update_ref 1 -n $NPROC -x 2>&1 | tee 'logs/test_decoder_constant_bitrate_no_binaural-update_ref-log.txt' ") | Invoke-Expression # temporarily test cases that fail # test_decoder_scenebased - ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py::test_decoder_scenebased --update_ref 1 -n $NPROC | tee 'logs/test_decoder_constant_bitrate_no_binaural_test_decoder_scenebased-update_ref-log.txt' ") | Invoke-Expression - If($LASTEXITCODE) {("exit $LASTEXITCODE") | Invoke-Expression} #- ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py::test_decoder_scenebased --update_ref 1 -n $NPROC 2>&1 | tee 'logs/test_decoder_constant_bitrate_no_binaural_test_decoder_scenebased-update_ref-log.txt' ") | Invoke-Expression #- If($LASTEXITCODE) {("exit $LASTEXITCODE") | Invoke-Expression} # test_decoder_combined_formats - ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py::test_decoder_combined_formats --update_ref 1 -n $NPROC | tee 'logs/test_decoder_constant_bitrate_no_binaural_test_decoder_combined_formats-update_ref-log.txt' ") | Invoke-Expression - ("& python -m pytest .\tests\codec_be_to_accepted_release\decoder\test_decoder_constant_bitrate_no_binaural.py::test_decoder_combined_formats --update_ref 1 -n $NPROC 2>&1 | tee 'logs/test_decoder_constant_bitrate_no_binaural_test_decoder_combined_formats-update_ref-log.txt' ") | Invoke-Expression - If($LASTEXITCODE) {("exit $LASTEXITCODE") | Invoke-Expression} artifacts: Loading
tests/codec_be_to_accepted_release/decoder/__init__.py +1 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,7 @@ def run_check( ref_bitstream, output_path, add_option_list=options, timeout=1, # for testing, to be reviewed ) if not is_ref_creation and not is_be_to_ref(output_path): Loading
tests/conftest.py +37 −24 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import logging from pathlib import Path import platform from subprocess import run from subprocess import TimeoutExpired import textwrap from typing import Optional import os Loading Loading @@ -219,6 +220,7 @@ class EncoderFrontend: bypass_mode: Optional[int] = None, quiet_mode: Optional[bool] = True, add_option_list: Optional[list] = None, timeout: Optional[int] = None, ) -> None: command = [self._path] Loading Loading @@ -252,7 +254,8 @@ class EncoderFrontend: cmd_str = textwrap.indent(" ".join(command), prefix="\t") log_dbg_msg(f"{self._type} encoder command:\n{cmd_str}") result = run(command, capture_output=True, check=False) try: result = run(command, capture_output=True, check=False, timeout=timeout) self.returncode = result.returncode self.stderr = result.stderr.decode("ascii") self.stdout = result.stdout.decode("ascii") Loading @@ -264,6 +267,10 @@ class EncoderFrontend: log_dbg_msg(f"{self._type} encoder stderr:\n{stderr_str}") if self.returncode: pytest.fail(f"{self._type} encoder terminated with a non-0 return code: {self.returncode}") except TimeoutExpired as err: log_dbg_msg(f"{self._type} encoder timed stdout:\n{err.stdout}") log_dbg_msg(f"{self._type} encoder timed stderr:\n{err.stderr}") pytest.fail(f"{self._type} encoder timed out") def _check_run(self): if self.returncode is not None: Loading Loading @@ -360,6 +367,7 @@ class DecoderFrontend: quiet_mode: Optional[bool] = True, plc_file: Optional[Path] = None, add_option_list: Optional[list] = None, timeout: Optional[int] = None, ) -> None: command = [self._path] Loading @@ -386,7 +394,8 @@ class DecoderFrontend: cmd_str = textwrap.indent(" ".join(command), prefix="\t") log_dbg_msg(f"{self._type} decoder command:\n{cmd_str}") result = run(command, capture_output=True, check=False) try: result = run(command, capture_output=True, check=False, timeout=timeout) self.returncode = result.returncode self.stderr = result.stderr.decode("ascii") self.stdout = result.stdout.decode("ascii") Loading @@ -398,6 +407,10 @@ class DecoderFrontend: log_dbg_msg(f"{self._type} decoder stderr:\n{stderr_str}") if self.returncode: pytest.fail(f"{self._type} decoder terminated with a non-0 return code: {self.returncode}") except TimeoutExpired as err: log_dbg_msg(f"{self._type} decoder timed stdout:\n{err.stdout}") log_dbg_msg(f"{self._type} decoder timed stderr:\n{err.stderr}") pytest.fail(f"{self._type} decoder timed out") def _check_run(self): if self.returncode is not None: Loading