Commit 3a4838c3 authored by kinuthia's avatar kinuthia
Browse files

Revert "temporarily add 1s timeout to decoder test"

This reverts commit 01b3a954.
parent 66eb03a6
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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 2>&1 | 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 | 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 2>&1 | 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 | 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 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}
    - ("& 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}

    # 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 2>&1 | 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 | 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:
+0 −1
Original line number Diff line number Diff line
@@ -195,7 +195,6 @@ 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):
+24 −37
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ import logging
from pathlib import Path
import platform
from subprocess import run
from subprocess import TimeoutExpired
import textwrap
from typing import Optional
import os
@@ -220,7 +219,6 @@ 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]

@@ -254,8 +252,7 @@ class EncoderFrontend:
        cmd_str = textwrap.indent(" ".join(command), prefix="\t")
        log_dbg_msg(f"{self._type} encoder command:\n{cmd_str}")

        try:
            result = run(command, capture_output=True, check=False, timeout=timeout)
        result = run(command, capture_output=True, check=False)
        self.returncode = result.returncode
        self.stderr = result.stderr.decode("ascii")
        self.stdout = result.stdout.decode("ascii")
@@ -267,10 +264,6 @@ 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:
@@ -367,7 +360,6 @@ 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]

@@ -394,8 +386,7 @@ class DecoderFrontend:
        cmd_str = textwrap.indent(" ".join(command), prefix="\t")
        log_dbg_msg(f"{self._type} decoder command:\n{cmd_str}")

        try:
            result = run(command, capture_output=True, check=False, timeout=timeout)
        result = run(command, capture_output=True, check=False)
        self.returncode = result.returncode
        self.stderr = result.stderr.decode("ascii")
        self.stdout = result.stdout.decode("ascii")
@@ -407,10 +398,6 @@ 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: