Commit 3ea6e92d authored by Jan Kiene's avatar Jan Kiene
Browse files

add new stage for checking BE with target branch

parent 1056c027
Loading
Loading
Loading
Loading
+70 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ stages:
  - .pre
  - prevalidate
  - build
  - check-be
  - test
  - deploy

@@ -410,6 +411,62 @@ stages:
      junit:
        - report-junit.xml

.check-be-to-target-anchor: &check-be-to-target-anchor
  stage: check-be
  needs: ["build-codec-linux-make"]
  timeout: "300 minutes"
  variables:
    XML_REPORT: "report--$CI_JOB_NAME--sha-$CI_COMMIT_SHORT_SHA.xml"
    HTML_REPORT: "report--$CI_JOB_NAME--sha-$CI_COMMIT_SHORT_SHA.html"
    FAILED_TESTCASES_LIST: "failed-testcases.txt"
  script:
    - set -euxo pipefail
    - *print-common-info
    - *update-scripts-repo

    - if [ $USE_LTV -eq 1 ]; then
    -    *update-ltv-repo
    -    *copy-ltv-files-to-testv-dir
    -    testcase_timeout=$TESTCASE_TIMEOUT_LTV
    - else
    -    testcase_timeout=$TESTCASE_TIMEOUT_STV
    - fi

    - python3 ci/remove_unsupported_testcases.py $PRM_FILES
    - if [ $LEVEL_SCALING != "1.0" ];then
    -   *apply-testv-scaling
    - fi

    - *build-and-create-reference-outputs

    - exit_code=0
    - python3 -m pytest --tb=no $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_BRANCH | grep -c 'errors="0"') || true

    - touch $FAILED_TESTCASES_LIST
    - if [ $exit_code -ne 0 ]; then
    -   exit_code=$EXIT_CODE_NON_BE
    -   grep "FAILED" pytest_log.txt | sed 's/^FAILED //' | awk -F'::' '{print "\"" $1 "::" $2 "\"" }' > $FAILED_TESTCASES_LIST
    - fi

    - exit $exit_code

  allow_failure:
    exit_codes:
      - 123
  artifacts:
    name: "$CI_JOB_NAME--sha-$CI_COMMIT_SHORT_SHA--results"
    expire_in: 1 week
    when: always
    paths:
      - $XML_REPORT
      - $HTML_REPORT
    expose_as: "pytest compare results"
    reports:
      junit:
        - $XML_REPORT_BRANCH
        - $XML_REPORT_MAIN

.ivas-pytest-on-merge-request-anchor: &ivas-pytest-on-merge-request-anchor
  stage: test
  needs: ["build-codec-linux-make"]
@@ -789,6 +846,19 @@ build-codec-windows-msbuild:
# Short test jobs that run in merge request pipelines
# ---------------------------------------------------------------

### jobs that check for bitexactness of fx encoder and decoder
check-be-to-target-short-enc-0db:
  extends:
    - .rules-pytest-to-main-short
    - .test-job-linux
  before_script:
    - USE_LTV=0
    - DUT_DECODER_PATH=./IVAS_dec_ref
    - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER"
    - LEVEL_SCALING=1.0
    - SKIP_REGRESSION_CHECK="true"
  <<: *check-be-to-target-anchor

### jobs that test fx encoder -> flt decoder
ivas-pytest-compare_to_main-short-enc:
  extends: