Commit 45a70d21 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge branch 'main' into 34-bug-in-masa-format-ext-output-spherical-indexing

parents 7051b253 ca31cb52
Loading
Loading
Loading
Loading
Loading
+83 −12
Original line number Diff line number Diff line
variables:
  TESTV_DIR: "/usr/local/testv"

  BUILD_OUTPUT: "build_output.txt"

# prevent running two pipelines on pushes to merge request branches
workflow:
@@ -38,18 +38,53 @@ stages:
    - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi
    - cp -r scripts/testv/* $TESTV_DIR/


# build all components of the project, i.e. codec itself, the unittests, the prerenderer and the standalone version of the TD object renderer
build-all-linux-make:
# template for build jobs to include the check for warnings
.build-job-with-check-for-warnings:
  extends: .test-job-linux
  stage: build
  allow_failure:
    exit_codes:
      - 123


build-codec-linux-make:
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  stage: build
  script:
    - bash ci/build_all_linux.sh
    - make -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-unittests-linux:
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
    - make unittests -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-prerenderer-linux:
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
    - make -C scripts/prerenderer -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-td-object-renderer-standalone-linux:
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
    - make -C scripts/td_object_renderer/object_renderer_standalone -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-codec-linux-cmake:
  extends: .test-job-linux
  extends: .build-job-with-check-for-warnings
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  stage: build
@@ -57,7 +92,10 @@ build-codec-linux-cmake:
    - mkdir build
    - cd build
    - cmake ..
    - make -j
    - cd ..
    - make -C build -j 2>&1 | tee $BUILD_OUTPUT
    # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...<
    - ci/check_for_warnings.py $BUILD_OUTPUT || exit $?

build-codec-instrumented-linux:
  extends: .test-job-linux
@@ -80,13 +118,18 @@ build-codec-sanitizers-linux:
# test that runs all modes with 1s input signals
codec-smoke-test:
  extends: .test-job-linux-needs-testv-dir
  # temporarily restrict this job to the only runner which (so far) seems to runit without problems
  tags:
    - test-fhg-linux-runner1
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  stage: test
  needs: [ "build-codec-linux-cmake" ]
  script:
    - bash ci/smoke_test.sh
    ### analyze for failures
    - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test failed"; exit 1; fi
    - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test without PLC failed"; exit 1; fi
    - if cat smoke_test_output_plc.txt | grep -c "failed"; then echo "Smoke test with PLC failed"; exit 1; fi
  artifacts:
    paths:
      - out/logs
@@ -96,6 +139,7 @@ codec-smoke-test:
self-test-on-merge-request:
  extends: .test-job-linux
  stage: compare
  needs: [ "build-codec-linux-cmake", "codec-smoke-test" ]
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  script:
@@ -140,15 +184,42 @@ self-test-on-merge-request:
    - python3 ./scripts/self_test.py --encref IVAS_cod_ref --decref IVAS_dec_ref --enctest IVAS_cod_test --dectest IVAS_dec_test | tee test_output.txt

    ### analyse test output

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true
    - run_errors=$(cat test_output.txt | grep -c "test conditions had run errors") || true
    - bitexact=$(cat test_output.txt | grep -c "All [0-9]* tests are bitexact") || true
    - EXIT_CODE_NON_BE=123
    - EXIT_CODE_FAIL=1

    - selftest_exit_code=0

    # check for crashes during the test, if any happened, fail the test
    - if cat test_output.txt | grep -c "Run errors were encountered for the following conditions:"; then echo "Codec had run errors"; exit 1; fi
    # check for non bitexact output and fail test if the merge request does not have a non-BE tag
    - if ! cat test_output.txt | grep -c "All [0-9]* tests are bitexact" && ! echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]"; then echo "Non-bitexact cases without non-BE tag encountered"; exit 1; fi
    - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py"; exit $EXIT_CODE_FAIL; fi

    # check for non bitexact output and store exit code to also always run the SBA pytest
    - if [ $bitexact == 0 ] && [ $non_be_flag == 0 ] ; then echo "Non-bitexact cases without non-BE tag encountered"; selftest_exit_code=$EXIT_CODE_FAIL; fi
    - if [ $bitexact == 0 ] && [ $non_be_flag != 0 ]; then echo "Non-bitexact cases with non-BE tag encountered"; selftest_exit_code=$EXIT_CODE_NON_BE; fi

    ### run SBA pytest
    - exit_code=0
    - python3 ./scripts/ivas_pytests/self_test_b.py --encref IVAS_cod_ref --decref IVAS_dec_ref --encdut IVAS_cod_test --decdut IVAS_dec_test || exit_code=$?
    - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "pytest run had failures and non-BE flag not present"; exit $EXIT_CODE_FAIL; fi
    - zero_errors=$(cat report-junit.xml | grep -c 'testsuite errors="0"') || true
    - if [ $exit_code -eq 1 ] && [ $zero_errors == 1 ]; then echo "pytest run had failures, but no errors and non-BE flag present"; exit $EXIT_CODE_NON_BE; fi
    - if [ $exit_code -ne 0 ]; then echo "pytest run had errors"; exit $EXIT_CODE_FAIL; fi;
    # return exit code from selftest if everything went well with the pytest run
    - exit $selftest_exit_code
  allow_failure:
    exit_codes:
      - 123
  artifacts:
    paths:
      - test_output.txt
      - scripts/test/logs
      - scripts/ref/logs
    reports:
      junit: report-junit.xml


# Pull state of a branch on 3GPP repo, push to a mirror repo.
+0 −1
Original line number Diff line number Diff line
@@ -261,7 +261,6 @@
    <ClCompile Include="..\lib_com\ivas_sba_config.c" />
    <ClCompile Include="..\lib_com\ivas_spar_com.c" />
    <ClCompile Include="..\lib_com\ivas_spar_com_quant_util.c" />
    <ClCompile Include="..\lib_com\ivas_spar_foa_br_dist.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_dft_com.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_eclvq_com.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_ica_com.c" />
+0 −3
Original line number Diff line number Diff line
@@ -445,9 +445,6 @@
    <ClCompile Include="..\lib_com\ivas_spar_com_quant_util.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_spar_foa_br_dist.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_transient_det.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
+1 −2
Original line number Diff line number Diff line
@@ -327,8 +327,7 @@
    <ClCompile Include="..\lib_dec\ivas_sba_rendering.c" />
    <ClCompile Include="..\lib_dec\ivas_sce_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_spar_decoder.c" />
    <ClCompile Include="..\lib_dec\ivas_spar_foa_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_spar_foa_md_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_spar_md_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_adapt_GR_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_cng_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_stereo_dft_dec.c" />
+3 −6
Original line number Diff line number Diff line
@@ -527,9 +527,6 @@
    <ClCompile Include="..\lib_dec\ivas_crend.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_spar_foa_md_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_td_decorr.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
@@ -539,9 +536,6 @@
    <ClCompile Include="..\lib_dec\ivas_reverb_iir_filter.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_spar_foa_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_pca_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
@@ -584,6 +578,9 @@
    <ClCompile Include="..\lib_dec\ivas_sba_rendering.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_dec\ivas_spar_md_dec.c">
      <Filter>dec_ivas_c</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_dec\jbm_jb4_inputbuffer.h">
Loading