Commit e0c6fd18 authored by Jan Kiene's avatar Jan Kiene
Browse files

try with moving the pytest cache instead of file parsing

parent 3d459969
Loading
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ variables:
  COMPARE_DMX: ""
  SKIP_REGRESSION_CHECK: ""
  FAILED_TESTCASES_LIST: "failed-testcases.txt"
  PYTEST_CACHE_ARTIFACT: "pytest_cache.zip"
  MANUAL_PIPELINE_TYPE:
    description: "Type for the manual pipeline run. Use 'pytest-compare' to run comparison test against reference float codec."
    value: 'default'
@@ -441,6 +442,7 @@ stages:
    - *build-and-create-reference-outputs

    - exit_code=0
    - rm -rf .pytest_cache || true
    - python3 -m pytest -k "stereo and at" --tb=no -q $TEST_SUITE -v --keep_files --create_cut --html=$HTML_REPORT --self-contained-html --junit-xml=$XML_REPORT --mld --ssnr --odg --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH -n auto --testcase_timeout $testcase_timeout > pytest_log.txt || exit_code=$?
    - zero_errors_branch=$(cat $XML_REPORT | grep -c 'errors="0"') || true

@@ -452,6 +454,7 @@ stages:

    - cat $FAILED_TESTCASES_LIST

    - zip -r $PYTEST_CACHE_ARTIFACT .pytest_cache
    - exit $exit_code

  allow_failure:
@@ -466,6 +469,7 @@ stages:
      - $HTML_REPORT
      - $FAILED_TESTCASES_LIST
      - pytest_log.txt
      - $PYTEST_CACHE_ARTIFACT
    expose_as: "pytest compare results"
    reports:
      junit:
@@ -489,7 +493,9 @@ stages:
    - *print-common-info

    - if [ -s $FAILED_TESTCASES_LIST ]; then
    -   TEST_SUITE=$(cat $FAILED_TESTCASES_LIST)
    -   rm -rf .pytest_cache || true
    -   unzip $PYTEST_CACHE_ARTIFACT
    -   PYTEST_ADDOPTS="--last-failed"
    - else
    -   echo "All tested cases were bit-exact between $CI_MERGE_REQUEST_TARGET_BRANCH_NAME and $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME. No need to check for regressions."
    -   exit 0