diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d1067b210c158257f8ab9edb4c5821eafefd1743..6e483173eec0cb954a60fabfd4c74d123c80361e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,7 @@ variables: - 'pytest-mld' - 'pytest-mld-long' - 'evs-26444' + - 'sanitizer-stv' default: @@ -50,6 +51,9 @@ workflow: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'evs-26444' variables: IVAS_PIPELINE_NAME: 'EVS 26.444 test: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'sanitizer-stv' + variables: + IVAS_PIPELINE_NAME: 'Short testvectors sanitizers' - if: $CI_PIPELINE_SOURCE == 'schedule' # Scheduled in any branch variables: IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH' @@ -73,9 +77,8 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" date | xargs echo "System time is" -.mld-test-setup-codec: &mld-test-setup-codec +.setup-codec: &setup-codec - current_commit_sha=$(git rev-parse HEAD) - ### build reference binaries - git checkout $REFERENCE_TAG - make clean @@ -88,6 +91,10 @@ stages: - make clean - make -j + +.mld-test-setup-codec: &mld-test-setup-codec + - *setup-codec + ### prepare pytest # create short test vectors - python3 tests/create_short_testvectors.py @@ -127,7 +134,7 @@ stages: .copy-ltv-files-to-testv-dir: ©-ltv-files-to-testv-dir - cp "$LTV_DIR"/*.wav scripts/testv/ - cp "$LTV_DIR"/*.met scripts/testv/ - - cp "$LTV_DIR"/*.csv scripts/testv/ + - cp "$LTV_DIR"/*.csv scripts/testv/ .rules-pytest-mld: rules: @@ -185,7 +192,7 @@ stages: - fi - *remove-unsupported-testcases - if [ $LEVEL_SCALING != "1.0" ];then - - *apply-testv-scaling + - *apply-testv-scaling - fi - *mld-test-setup-codec @@ -199,7 +206,7 @@ stages: - python3 -m pytest $TEST_SUITE -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld -n auto --testcase_timeout $testcase_timeout || exit_code=$? - fi - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - + - python3 scripts/parse_mld_xml.py report-junit.xml mld.csv - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi @@ -221,6 +228,39 @@ stages: reports: junit: - report-junit.xml + + +.ivas-pytest-sanitizers-anchor: &ivas-pytest-sanitizers-anchor + stage: test + needs: ["build-codec-linux-make"] + timeout: "90 minutes" + rules: + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: never + - if: $CI_PIPELINE_SOURCE == 'schedule' && $IVAS_PYTEST_MSAN + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "sanitizer-stv" + script: + - *print-common-info + - *update-scripts-repo + - *remove-unsupported-testcases + - *setup-codec + - make clean + - make -j CLANG=$CLANG_NUM + - if [[ $CLANG_NUM == 3 ]]; then export UBSAN_OPTIONS="suppressions=scripts/ubsan.supp,report_error_type=1"; fi + - testcase_timeout=300 + - python3 -m pytest $SHORT_TEST_SUITE -v --tb=no --update_ref 1 -m create_ref --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout $testcase_timeout --ref_encoder_path ./IVAS_cod_ref --ref_decoder_path ./IVAS_dec + artifacts: + name: "ivas-pytest-dec-msan--sha-$CI_COMMIT_SHORT_SHA--results" + when: always + expire_in: "2 weeks" + paths: + - report-junit.xml + - report.html + reports: + junit: + - report-junit.xml # --------------------------------------------------------------- # Build jobs @@ -311,6 +351,27 @@ ivas-pytest-mld-dec-lev+10: - LEVEL_SCALING=3.162 <<: *ivas-pytest-mld-anchor +ivas-pytest-dec-msan: + extends: + - .test-job-linux + before_script: + - CLANG_NUM=1 + <<: *ivas-pytest-sanitizers-anchor + +ivas-pytest-dec-asan: + extends: + - .test-job-linux + before_script: + - CLANG_NUM=2 + <<: *ivas-pytest-sanitizers-anchor + +ivas-pytest-dec-usan: + extends: + - .test-job-linux + before_script: + - CLANG_NUM=3 + <<: *ivas-pytest-sanitizers-anchor + # --------------------------------------------------------------- # Long test jobs # ---------------------------------------------------------------