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

Merge branch 'main' into ci/interop-test

parents 0ffa71a2 dbc49984
Loading
Loading
Loading
Loading
Loading
+82 −4
Original line number Diff line number Diff line
@@ -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'        
@@ -119,8 +123,10 @@ stages:

# TODO: this needs to be updated in case the reference is updated
.remove-unsupported-testcases: &remove-unsupported-testcases
  - sed -i '1649,1655d' scripts/config/self_test.prm

  - sed -i '1701,1707d' scripts/config/self_test.prm
  - sed -i '1659,1661d' scripts/config/self_test.prm
  - sed -i '1635,1637d' scripts/config/self_test.prm
  - sed -i '1603,1605d' scripts/config/self_test.prm

.apply-testv-scaling: &apply-testv-scaling
  - echo "Applying level scaling in scripts/testv using scale=$LEVEL_SCALING"
@@ -221,10 +227,12 @@ stages:

    ### run pytest
    - exit_code=0
    # timeout of 15 min per individual testcase - hopefully too much, but better be safe for now
    - testcase_timeout=900
    - if [ $USE_REF_ENC -eq 1 ]; then
    -    python3 -m pytest $TEST_SUITE -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld --dut_encoder_path ./IVAS_cod_ref -n auto || exit_code=$?
    -    python3 -m pytest $TEST_SUITE -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld --dut_encoder_path ./IVAS_cod_ref -n auto --testcase_timeout $testcase_timeout || exit_code=$?
    - else
    -    python3 -m pytest $TEST_SUITE -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld -n auto || exit_code=$?
    -    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

@@ -249,6 +257,39 @@ stages:
      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
# ---------------------------------------------------------------
@@ -268,6 +309,22 @@ build-codec-linux-make:
    - *print-common-info
    - make -j

# ensure that codec builds on linux with instrumentation active
build-codec-linux-instrumented-make:
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web'
    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main
    - if: $CI_PIPELINE_SOURCE == 'schedule'
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
  extends:
    - .build-job-linux
  script:
    - *print-common-info
    - sed -i".bak" "s/\/\*#define WMOPS 1\*\//#define WMOPS 1/g" lib_com/count.h
    - make -j

# ---------------------------------------------------------------
# Short test jobs 
# ---------------------------------------------------------------
@@ -352,6 +409,27 @@ ivas-pytest-interop-enc-fixed-dec-float:
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - *ivas-pytest-interop-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 
# ---------------------------------------------------------------
+1 −1
Original line number Diff line number Diff line
/******************************************************************************************************

   (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
   (C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
   Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
   Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
   Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
+3 −0
Original line number Diff line number Diff line
@@ -154,6 +154,7 @@
    <ClCompile Include="..\lib_com\complex_basop.c" />
    <ClCompile Include="..\lib_com\control.c" />
    <ClCompile Include="..\lib_com\core_com_config.c" />
    <ClCompile Include="..\lib_com\count.c" />
    <ClCompile Include="..\lib_com\deemph.c" />
    <ClCompile Include="..\lib_com\delay_comp.c" />
    <ClCompile Include="..\lib_com\disclaimer.c" />
@@ -194,6 +195,7 @@
    <ClCompile Include="..\lib_com\get_gain.c" />
    <ClCompile Include="..\lib_com\gs_bitallocation.c" />
    <ClCompile Include="..\lib_com\gs_bitallocation_fx.c" />
    <ClCompile Include="..\lib_com\gs_bitallocation_ivas_fx.c" />
    <ClCompile Include="..\lib_com\gs_gains.c" />
    <ClCompile Include="..\lib_com\gs_gains_fx.c" />
    <ClCompile Include="..\lib_com\gs_inact_switching.c" />
@@ -262,6 +264,7 @@
    <ClCompile Include="..\lib_com\ivas_stereo_eclvq_com.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_eclvq_com_fx.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_ica_com.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_ica_com_fx.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_mdct_bands_com.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_mdct_stereo_com.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_psychlpc_com.c" />
+3 −0
Original line number Diff line number Diff line
@@ -520,6 +520,9 @@
    <ClCompile Include="..\lib_com\window.c" />
    <ClCompile Include="..\lib_com\window_ola.c" />
    <ClCompile Include="..\lib_com\wtda.c" />
    <ClCompile Include="..\lib_com\gs_bitallocation_ivas_fx.c" />
    <ClCompile Include="..\lib_com\count.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_ica_com_fx.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_com\basop_proto_func.h">
+4 −0
Original line number Diff line number Diff line
@@ -321,6 +321,7 @@
    <ClCompile Include="..\lib_dec\ivas_rom_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_sba_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_sba_dirac_stereo_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_sba_dirac_stereo_dec_fx.c" />
    <ClCompile Include="..\lib_dec\ivas_sba_rendering_internal.c" />
    <ClCompile Include="..\lib_dec\ivas_sce_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_sce_dec_fx.c" />
@@ -331,12 +332,15 @@
    <ClCompile Include="..\lib_dec\ivas_stereo_cng_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_dft_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_dft_dec_dmx.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_dft_dec_fx.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_dft_plc.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_dft_plc_fx.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_eclvq_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_esf_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_ica_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_icbwe_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_mdct_core_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_mdct_core_dec_fx.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_mdct_stereo_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_switching_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_td_dec.c" />
Loading