Commit 203c5f75 authored by norvell's avatar norvell
Browse files

Merge with main

parents 3011bc35 532bc112
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
IVAS_cod
IVAS_dec
IVAS_rend
ISAR_post_rend
obj/
*.a
*.o
@@ -16,6 +17,7 @@ build*/**/*
IVAS_cod.exe
IVAS_dec.exe
IVAS_rend.exe
ISAR_post_rend.exe
*.user
.vs/
Debug_*/
@@ -54,10 +56,12 @@ scripts/testv/stvOMASA_*.met
scripts/testv/stvOMASA_*.csv
scripts/testv/stvOMASA_2ISM_1MASA1TC48c.wav
scripts/testv/stvOMASA_3ISM_1MASA1TC48c.wav
scripts/testv/stvO*
# default reference binary name
IVAS_cod_ref*
IVAS_dec_ref*
IVAS_rend_ref*
ISAR_post_rend_ref*

# Python files that pop up when running scripts
__pycache__/
+187 −21
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ variables:
      - 'test-be-release'
      - 'test-long-self-test'
      - 'ivas-conformance'
      - 'ivas-conformance-linux'
  GIT_CLEAN_FLAGS: -ffdxq
  TESTCASE_TIMEOUT_STV_SANITIZERS: 180
  TESTCASE_TIMEOUT_LTV_SANITIZERS: 1200
@@ -58,6 +59,10 @@ workflow:
      variables:
        IVAS_PIPELINE_NAME: 'Draft IVAS Conformance test: $CI_COMMIT_BRANCH'        
    - if: $CI_PIPELINE_SOURCE == 'trigger'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux'
      variables:
        IVAS_PIPELINE_NAME: 'Draft IVAS Conformance test -- Linux: $CI_COMMIT_BRANCH'        
    

stages:
  - .pre
@@ -162,6 +167,12 @@ stages:
  - git pull
  - cd -

.update-ltv-repo-win: &update-ltv-repo-win
  - Push-Location
  - cd $LTV_DIR_WIN
  - git pull
  - Pop-Location

.enable-split-rendering: &enable-split-rendering
# automatically enable #define SPLIT_REND_WITH_HEAD_ROT in options.h, handling both /**/-comment and //-comment
  - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*SPLIT_REND_WITH_HEAD_ROT\)[[:space:]]*\*\//\1/g" ./lib_com/options.h
@@ -184,6 +195,11 @@ stages:
    - cp "$LTV_DIR"/*.met scripts/testv/
    - cp "$LTV_DIR"/*.csv scripts/testv/

.copy-ltv-files-to-testv-dir-win: &copy-ltv-files-to-testv-dir-win
    - cp $LTV_DIR_WIN\*.wav scripts\testv
    - cp $LTV_DIR_WIN\*.met scripts\testv
    - cp $LTV_DIR_WIN\*.csv scripts\testv

.activate-Werror-linux: &activate-Werror-linux
  - sed -i.bak "s/^# \(CFLAGS += -Werror\)/\1/" Makefile
  - sed -i.bak "s/# \(set(CMAKE_C_FLAGS \"\${CMAKE_C_FLAGS} -Werror\")\)/\1/" CMakeLists.txt
@@ -243,6 +259,8 @@ stages:
      when: never
    - if: $MANUAL_PIPELINE_TYPE == 'ivas-conformance'
      when: never      
    - if: $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux'
      when: never      
    - when: on_success

.rules-merge-request:
@@ -372,6 +390,17 @@ branch-is-up-to-date-with-main-pre:
    - echo $commits_behind_count
    - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, run 'git merge origin/main' to update."; exit 1; fi;

check-self-test-names-pre:
  extends:
    - .rules-merge-request
  stage: prevalidate
  needs: []
  tags:
    - ivas-linux
  script:
    - python3 ci/check_self_test_names.py scripts/config/self_test.prm 135


branch-is-up-to-date-with-main-post:
  extends:
    - .rules-merge-request
@@ -413,7 +442,7 @@ build-codec-instrumented-linux:
  extends:
    - .build-job-linux
    - .rules-basis
  timeout: "7 minutes"
  timeout: "10 minutes"
  script:
    - *print-common-info
    - *activate-Werror-linux
@@ -484,7 +513,6 @@ build-codec-windows-msbuild:
  script:
    - *print-common-info-windows
    - *activate-WX-windows
    - python .\scripts\strip_split_rendering.py
    - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug

# ---------------------------------------------------------------
@@ -551,6 +579,8 @@ codec-asan:
codec-usan:
  extends:
    - .sanitizer-selftest-on-mr
  tags:
    - ivas-linux-fast
  before_script:
    - CLANG_NUM=3
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS
@@ -780,6 +810,18 @@ split-rendering-smoke-test:
      junit:
        - report-junit.xml

lc3-wrapper-unit-test:
  extends:
    - .test-job-linux
    - .rules-merge-request
  needs: ["build-codec-linux-cmake"]
  stage: test
  script:
    - *enable-split-rendering
    - cmake -B cmake-build -G "Unix Makefiles" -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true
    - cmake --build cmake-build -- -j
    - scripts/split_rendering/lc3plus/ivas_lc3plus_unit_test

# compare split-rendering bitexactness between target and source branch
split-rendering-pytest-on-merge-request:
  extends:
@@ -1328,44 +1370,46 @@ ivas-conformance:
  tags:
    - ivas-windows
  stage: test
  timeout: "60 minutes"
  timeout: "90 minutes"
  rules:
    - if: ($CI_PIPELINE_SOURCE == 'web' || $CI_PIPELINE_SOURCE == 'trigger') && $MANUAL_PIPELINE_TYPE == 'ivas-conformance'
    - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  allow_failure:
    exit_codes:
      - 123
  script:
    - *print-common-info-windows    
    # Prepare reference exec, use tests and scripts from reference
    - $source_branch_commit_sha = $(git rev-parse HEAD)
    - git checkout main # This should be set to a relevant reference
    - python .\scripts\strip_split_rendering.py
    - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug    
    - cp -force IVAS_cod.exe IVAS_cod_ref.exe
    - cp -force IVAS_dec.exe IVAS_dec_ref.exe
    - cp -force IVAS_rend.exe IVAS_rend_ref.exe 
    - git restore .
    - git checkout $source_branch_commit_sha
    
    # Reference creation
    - python tests/create_short_testvectors.py
    - python scripts/prepare_combined_format_inputs.py
    - python -m pytest tests/codec_be_on_mr_nonselection -v -n auto --update_ref 1 -m create_ref --keep_files
    - python -m pytest tests/codec_be_on_mr_nonselection -v -n auto --update_ref 1 -m create_ref_part2 --keep_files
    - python -m pytest tests/renderer/test_renderer.py --create_ref --keep_files
    - $TEST_SET = "tests/codec_be_on_mr_nonselection", "tests/renderer/test_renderer.py", "tests/split_rendering/test_split_rendering.py"
    - python -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref --create_ref --keep_files
    - python -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref_part2 --keep_files

    # Output creation
    - python -m pytest tests/codec_be_on_mr_nonselection tests/renderer/test_renderer.py -v -n auto --keep_files --create_cut --html=report_cmd.html --self-contained-html
    - python -m pytest $TEST_SET -v -n auto --keep_files --create_cut --html=report_cmd.html --self-contained-html
    - python scripts/parse_commands.py report_cmd.html Readme_IVAS.txt
    
    # Copy input data and output ref data
    - if (Test-Path testvec) {rm -r -force testvec}
    - if (Test-Path TMP_DEC) {rm -r -force TMP_DEC}
    - if (Test-Path TMP_ENC) {rm -r -force TMP_ENC}    
    - if (Test-Path TMP_JBM) {rm -r -force TMP_JBM}
    - if (Test-Path TMP_REND) {rm -r -force TMP_REND}
    - if (Test-Path TMP_ISAR_POST_REND) {rm -r -force TMP_ISAR_POST_REND}    
    - if (Test-Path TMP_DEC_ISAR) {rm -r -force TMP_DEC_ISAR}    
    - mkdir testvec
    - mkdir testvec/binauralRenderer_interface
    - mkdir testvec/testv
    - mkdir testvec/testv/renderer
    - mkdir testvec/testv/split_rendering        
    - mkdir testvec/bin    
    - cp -r -force -ErrorAction Ignore scripts/testv/* testvec/testv
    - cp    -force -ErrorAction Ignore scripts/testv/* testvec/testv
    - cp -r -force -ErrorAction Ignore scripts/ls_layouts testvec
    - cp -r -force -ErrorAction Ignore scripts/switchPaths testvec
    - cp -r -force -ErrorAction Ignore scripts/trajectories testvec
@@ -1373,14 +1417,26 @@ ivas-conformance:
    - cp -r -force -ErrorAction Ignore tests/ref testvec/testv/ref
    - cp -r -force -ErrorAction Ignore tests/dut/* testvec/testv/ref
    - cp -r -force -ErrorAction Ignore tests/renderer/cut testvec/testv/renderer/ref
    - cp -r -force -ErrorAction Ignore tests/split_rendering/cut testvec/testv/split_rendering/ref 
    - cp -r -force -ErrorAction Ignore tests/split_rendering/renderer_configs testvec/testv/split_rendering/renderer_configs 
    - cp -r -force -ErrorAction Ignore tests/split_rendering/error_patterns testvec/testv/split_rendering/error_patterns 
    
    # Remove redundant files 
    - python scripts/cleanup_26252.py

    # Copy test script files
    - cp -r -force -ErrorAction Ignore tests/conformance-test testvec/
    - cp Readme_IVAS_dec.txt testvec
    - cp Readme_IVAS_enc.txt testvec 
    - cp Readme_IVAS_rend.txt testvec
    - cp Readme_IVAS_JBM_dec.txt testvec
    - cp Readme_IVAS_ISAR_dec.txt testvec 
    - cp Readme_IVAS_ISAR_post_rend.txt testvec   
    - cp IVAS_cod.exe testvec/bin
    - cp IVAS_dec.exe testvec/bin
    - cp IVAS_rend.exe testvec/bin
    - cp ISAR_post_rend.exe testvec/bin    
    
    
    # Test run generated scripts in testvec
    - cd testvec    
@@ -1399,10 +1455,120 @@ ivas-conformance:
      - Readme_IVAS_enc.txt  
      - Readme_IVAS_rend.txt
      - Readme_IVAS_JBM_dec.txt
      - Readme_IVAS_ISAR_dec.txt 
      - Readme_IVAS_ISAR_post_rend.txt    
    expose_as: "Draft IVAS conformance"
    reports:
      junit: report-junit.xml

ivas-conformance-linux:
  tags:
    - ivas-linux
  stage: test
  timeout: "90 minutes"
  rules:
    - if: ($CI_PIPELINE_SOURCE == 'web' || $CI_PIPELINE_SOURCE == 'trigger') && $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux'
  allow_failure:
    exit_codes:
      - 123
  script:
    - *print-common-info
    - make -j
    - cp IVAS_cod IVAS_cod_ref
    - cp IVAS_dec IVAS_dec_ref
    - cp IVAS_rend IVAS_rend_ref
    
    # Reference creation
    - python3 tests/create_short_testvectors.py
    - python3 scripts/prepare_combined_format_inputs.py
    - TEST_SET="tests/codec_be_on_mr_nonselection tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py"
    - python3 -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref --create_ref --keep_files
    - python3 -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref_part2 --keep_files

    # Output creation
    - python3 -m pytest $TEST_SET -v -n auto --keep_files --create_cut --html=report_cmd.html --self-contained-html
    - python3 scripts/parse_commands.py report_cmd.html Readme_IVAS.txt
    
    # Copy input data and output ref data
    - rm -rf testvec
    - mkdir testvec
    - mkdir testvec/binauralRenderer_interface
    - mkdir testvec/testv
    - mkdir testvec/testv/renderer
    - mkdir testvec/testv/split_rendering    
    - mkdir testvec/bin    
    - cp -r scripts/testv/* testvec/testv
    - cp -r scripts/ls_layouts testvec
    - cp -r scripts/switchPaths testvec
    - cp -r scripts/trajectories testvec
    - cp -r scripts/binauralRenderer_interface/binaural_renderers_hrtf_data testvec/binauralRenderer_interface
    - cp -r tests/ref testvec/testv/ref
    - cp -r tests/dut/* testvec/testv/ref
    - cp -r tests/renderer/cut testvec/testv/renderer/ref
    - cp -r tests/split_rendering/cut testvec/testv/split_rendering/ref  
    - cp -r tests/split_rendering/renderer_configs testvec/testv/split_rendering/renderer_configs 
    - cp -r tests/split_rendering/error_patterns testvec/testv/split_rendering/error_patterns    
    
    # Remove redundant files 
    - python3 scripts/cleanup_26252.py
    
    # Copy test script files
    - cp -r tests/conformance-test testvec/
    - cp Readme_IVAS_dec.txt testvec
    - cp Readme_IVAS_enc.txt testvec 
    - cp Readme_IVAS_rend.txt testvec
    - cp Readme_IVAS_JBM_dec.txt testvec
    - cp Readme_IVAS_ISAR_dec.txt testvec 
    - cp Readme_IVAS_ISAR_post_rend.txt testvec    
    
    # Create GCOV execs for coverage analysis
    - make clean
    - make GCOV=1 -j
    
    - cp IVAS_cod testvec/bin
    - cp IVAS_dec testvec/bin
    - cp IVAS_rend testvec/bin
    - cp ISAR_post_rend testvec/bin    
        
    # Test run generated scripts in testvec
    - cd testvec   
    - exit_code=0    
    - python3 -m pytest conformance-test/test_26252.py --junit-xml=report-junit.xml --html=report.html --self-contained-html || exit_code=$?
    - mv report.html ..
    - mv report-junit.xml ..

    # Collect coverage
    - cd -
    - lcov -c -d obj -o coverage.info
    - lcov -r coverage.info "*apps*" -o coverage.info
    - lcov -r coverage.info "*lib_util*" -o coverage.info
    - commit_sha=$(git rev-parse HEAD)
    - genhtml coverage.info -o coverage -t "Coverage on main @ $commit_sha"

    # Check for failures
    - if [ $exit_code -eq 1 ]; then echo "Test failures encountered"; exit $EXIT_CODE_FAIL; fi
    
  artifacts:
    name: "ivas-conformance-linux-$CI_COMMIT_SHORT_SHA"
    expire_in: 1 week
    when: always
    paths:
      - report_cmd.html
      - report-junit.xml
      - report.html
      - Readme_IVAS_dec.txt  
      - Readme_IVAS_enc.txt  
      - Readme_IVAS_rend.txt
      - Readme_IVAS_JBM_dec.txt
      - Readme_IVAS_ISAR_dec.txt 
      - Readme_IVAS_ISAR_post_rend.txt    
      - coverage.info
      - coverage
    expose_as: "Draft IVAS conformance -- Linux"
    reports:
      junit: report-junit.xml


test-long-self-test:
  tags:
    - ivas-linux-fast
@@ -1484,7 +1650,7 @@ ltv-msan:
    - .sanitizer-selftest-ltv
  rules:
    - if: $SANITIZER_SCHEDULE_E
  timeout: 1 hour
  timeout: 3 hour
  tags:
    - ivas-linux-fast
  before_script:
@@ -1500,10 +1666,10 @@ ltv-asan:
  rules:
    - if: $SANITIZER_SCHEDULE_E
      when: delayed
      start_in: 1 hours
      start_in: 3 hours
  tags:
    - ivas-linux-fast
  timeout: 1 hour
  timeout: 3 hour
  before_script:
    - CLANG_NUM=2
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS
@@ -1517,10 +1683,10 @@ ltv-usan:
  rules:
    - if: $SANITIZER_SCHEDULE_E
      when: delayed
      start_in: 2 hours
      start_in: 6 hours
  tags:
    - ivas-linux-fast
  timeout: 1 hour
  timeout: 3 hour
  before_script:
    - CLANG_NUM=3
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ Link to test pipeline: XXX
Using the [scripts](https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/wikis/Software-development/pyivastest-howto#how-to-reproduce-tests):
<!--- check correct sanitizer type -->
<!--- add error pattern if needed -->
<!--- copy as needed: -J dly_profile.dat -T head_rot_traj.csv -exof exof_traj.csv -->
```
python3 scripts/IvasBuildAndRunChecks.py --checks CLANG2 -m MODE -p /path/to/my/local/ci_linux_ltv_local.json
```
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ in the `Makefile` at lines 71 and 72. Note that this may increase runtime heavil
Using the [scripts](https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/wikis/Software-development/pyivastest-howto#how-to-reproduce-tests):
<!--- check correct sanitizer type -->
<!--- add error pattern if needed -->
<!--- copy as needed: -J dly_profile.dat -T head_rot_traj.csv -exof exof_traj.csv -->

```
python3 scripts/IvasBuildAndRunChecks.py --checks CLANG1 -m MODE -p /path/to/my/local/ci_linux_ltv_local.json
+4 −2
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ Link to test pipeline: XXX
Using the [scripts](https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/wikis/Software-development/pyivastest-howto#how-to-reproduce-tests):
<!--- check correct sanitizer type -->
<!--- add error pattern if needed -->
<!--- copy as needed: -J dly_profile.dat -T head_rot_traj.csv -exof exof_traj.csv -->

```
python3 scripts/IvasBuildAndRunChecks.py --checks CLANG3 -m MODE -p /path/to/my/local/ci_linux_ltv_local.json --usan_supp_file scripts/ubsan.supp
```
@@ -27,9 +29,9 @@ or directly:
```
make clean
make -j CLANG=3
./IVAS_cod ...
UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1,log_path=usan_log_catchall ./IVAS_cod ...
networkSimulator_g192 dly_profile.dat bit bit_err trace_dump 1
./IVAS_dec ...
UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1,log_path=usan_log_catchall ./IVAS_dec ...
```

<!--- Below are labels that will be added but are not shown in description. This is a template to help fill them.
Loading