Commit c8c89fab authored by Adam Mills's avatar Adam Mills
Browse files

Modifying CI script to run code-cov on a specific branch

parent d2dd5783
Loading
Loading
Loading
Loading
+35 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ variables:
      - 'default'
      - 'test-be-release'
      - 'test-long-self-test'
      - 'code-cov-on-branch'


default:
@@ -1502,6 +1503,40 @@ coverage-test-on-main-scheduled:
      - coverage.info
      - coverage

# GCOV/LCOV coverage analysis of self_test suite
coverage-test-on-branch:
  extends:
    - .test-job-linux-needs-testv-dir
  tags:
    - ivas-linux
  stage: test
  rules:
    # only run in scheduled pipeline that passes this env vars
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'code-cov-on-branch'
  timeout: 4 hours
  script:
    - *print-common-info
    - *update-ltv-repo
    - make GCOV=1 -j
    - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script
    - python3 tests/create_short_testvectors.py
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n 0 --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n 0 --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v -n 0 --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - bash ci/smoke_test.sh coverage
    - python3 -m pytest -q -n auto tests/renderer/test_renderer_be_comparison.py
    - bash ci/ivas_voip_be_test.sh coverage
    - lcov -c -d obj -o coverage.info
    - commit_sha=$(git rev-parse HEAD)
    - genhtml coverage.info -o coverage -t "Coverage on main @ $commit_sha"
  artifacts:
    name: "main-coverage-sha-$CI_COMMIT_SHORT_SHA"
    when: always
    expire_in: 1 week
    paths:
      - coverage.info
      - coverage

# ---------------------------------------------------------------
# Complexity measurement jobs
# ---------------------------------------------------------------