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

add sanitizer test for fmt switching

parent 034948c2
Loading
Loading
Loading
Loading
Loading
+42 −1
Original line number Diff line number Diff line
@@ -51,6 +51,47 @@ format-switching-compare-test:
    paths:
      - report.html
      - report.xml
    name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--fmt-sw-smoketest"
    name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--fmt-sw-compare"
    expose_as: "fmt-sw-smoketest"
    expire_in: "5 days"

format-switching-sanitizers:
  extends:
    - .test-job-linux
    - .rules-merge-request-to-main
  stage: compare
  needs: ["build-codec-linux-clang-make"]
  parallel:
    matrix:
      - SANITIZER:
        - MSAN
        - ASAN
        - USAN
  tags:
    - ivas-linux
  script:
    - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh
    - |
      if [ "$CI_PROJECT_ID" == "$PROJECT_ID_BASOP" ]; then
          bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh
      fi

    - declare -A CLANG_NUM_4_SANITIZER
    - CLANG_NUM_4_SANITIZER["MSAN"] = 1
    - CLANG_NUM_4_SANITIZER["ASAN"] = 2
    - CLANG_NUM_4_SANITIZER["USAN"] = 3

    - clang_num="$CLANG_NUM_4_SANITIZER[$SANITIZER]"

    - make -j IVAS_dec CLANG=$clang_num
    # TODO: for basop - ignorelist
    - export UBSAN_OPTIONS="suppressions=scripts/ubsan_basop.supp,report_error_type=1,print_stacktrace=1"
    - python3 -m pytest tests/format_switching/test_format_switching.py --create_ref --ref_encoder_path ./IVAS_dec
  timeout: "20 minutes"
  artifacts:
    paths:
      - report.html
      - report.xml
    name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--fmt-sw-sanitizers"
    expose_as: "fmt-sw-smoketest"
    expire_in: "5 days"