Commit 826d8f21 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into 757-output-configs-in-ivas_modes-json-are-not-complete

parents 44b649fb 4fbbc08a
Loading
Loading
Loading
Loading
Loading
+84 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ variables:
    options:
      - 'default'
      - 'test-be-release'
      - 'test-long-self-test'


default:
@@ -46,6 +47,9 @@ workflow:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-be-release'
      variables:
        IVAS_PIPELINE_NAME: 'Test BE to release pipeline: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-long-self-test'
      variables:
        IVAS_PIPELINE_NAME: 'Test long self-test against main pipeline: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'trigger'

stages:
@@ -174,6 +178,8 @@ stages:
      when: never
    - if: $MANUAL_PIPELINE_TYPE == 'test-be-release' # Skip all the normal jobs when testing manually against release codec
      when: never
    - if: $MANUAL_PIPELINE_TYPE == 'test-long-self-test' # Skip all the normal jobs when testing manually against release codec
      when: never
    - when: on_success

.rules-merge-request:
@@ -385,6 +391,7 @@ codec-smoke-test:
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - smoke_test_output.txt
      - smoke_test_output_plc.txt
@@ -409,6 +416,7 @@ codec-msan:
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - scripts/ref/logs/
      - test_output.txt
@@ -431,6 +439,7 @@ codec-asan:
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - scripts/ref/logs/
      - test_output.txt
@@ -454,6 +463,7 @@ codec-usan:
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - scripts/ref/logs/
    expose_as: "usan selftest results"
@@ -677,6 +687,7 @@ split-rendering-pytest-on-merge-request:
    - make -j INCLUDE_SPLIT=1

    ### Run test using scripts and input from main
    - if [ $ref_using_main == 1 ]; then git restore lib_com/options.h; fi # Revert changes back before checking out another branch to avoid conflicts
    - if [ $ref_using_main == 1 ]; then git checkout $target_commit; fi

    # run test
@@ -859,7 +870,7 @@ clang-format-check:
    expire_in: 1 day
    paths:
      - tmp-formatting-fix/
    when: on_failure
    when: always
    name: "$ARTIFACT_BASE_NAME"
    expose_as: "formatting patch"

@@ -896,7 +907,7 @@ check-first-frame-is-sid:
  artifacts:
    paths:
      - out/logs
    when: on_failure
    when: always
    name: "$CI_JOB_NAME--$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--sidstart"
    expose_as: "logs-sidstart"
    expire_in: "5 days"
@@ -1087,6 +1098,77 @@ test-be-to-release:
      - logs/
    expose_as: "test-be-to-release results"


test-long-self-test:
  tags:
    - ivas-linux-fast
  stage: compare
  resource_group: ivas-long-self-test-resource
  timeout: "50 minutes"
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-long-self-test'
  allow_failure:
    exit_codes:
      - 123
  script:
    - *print-common-info
    - *update-ltv-repo

    ### build branch binaries
    - cmake . -Bbuild-test
    - cmake --build build-test -- -j
    - mv build-test/IVAS_cod ./IVAS_cod
    - mv build-test/IVAS_dec ./IVAS_dec

    ### store the current commit hash
    - source_branch_commit_sha=$(git rev-parse HEAD)

    ### switch to main
    - git checkout main

    ### build main (ref) binaries
    - cmake . -Bbuild-ref
    - cmake --build build-ref -- -j
    - mv build-ref/IVAS_cod ./IVAS_cod_ref
    - mv build-ref/IVAS_dec ./IVAS_dec_ref

    ### Switch back to branch, this could probably be removed later
    - git checkout $source_branch_commit_sha

    ### prepare pytest

    # Copy test vectors from LTV to TESTV
    - cp "$LTV_DIR"/*.wav scripts/testv/
    - cp "$LTV_DIR"/*.met scripts/testv/
    - cp "$LTV_DIR"/*.csv scripts/testv/

    # create references
    - exit_code_ref=0
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_ltv.prm || exit_code_ref=$?

    ### run pytest self-test using long test vectors
    - exit_code=0
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v --param_file scripts/config/self_test_ltv.prm --html=report-ltv.html --self-contained-html --junit-xml=report-junit-ltv.xml || exit_code=$?
    - zero_errors=$(cat report-junit-ltv.xml | grep -c 'errors="0"') || true

    - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - if [ $exit_code -eq 1 ]; then echo "Non-bitexact cases encountered!"; exit $EXIT_CODE_NON_BE; fi
    - exit 0


  artifacts:
    name: "test-long-self-test--sha-$CI_COMMIT_SHORT_SHA--results"
    when: always
    expire_in: 4 mos
    paths:
      - report-junit-ltv.xml
      - report-ltv.html
    expose_as: "test-long-self-test results"
    reports:
      junit:
        - report-junit-ltv.xml


# ---------------------------------------------------------------
# Scheduled jobs on main
# ---------------------------------------------------------------
+25 −0
Original line number Diff line number Diff line
<!--- Basic information that is useful -->
- Related issues:
- Requested reviewers: 

### Reason why this change is needed

* This may be a direct copy from the issue.

### Description of the change

* Describe what is done.

### Affected operating points

* Describe here as well as possible what operating points are affected and how
* In minimum, there should be a status for bitstream compatibility and output bit exactness
* For bitstream compatibility, the following levels are helpful for describing encoder
  1. Produced bitstream is BE compared to previous state.
  2. Produced bitstream is non-BE but it is fully backwards compatible for decoding. Decoded output may differ.
  3. Produced bitstream is non-BC. Old decoder cannot decode the produced bitstream correctly.
* For output difference, use BE or non-BE. Additionally, amount of difference can be presented.


<!--- By default, no labels are added as they often come from the issue. Add labels if there is no issue for this. -->
+15 −15
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ if(UNIX)
endif()
target_include_directories(lib_com PUBLIC lib_com PRIVATE lib_enc lib_dec lib_rend lib_debug)
if(INCLUDE_SPLIT)
  target_include_directories(lib_com PRIVATE lc3plus)
  target_include_directories(lib_com PRIVATE lib_lc3plus)
endif()

file(GLOB libDebugSrcs "lib_debug/*.c")
@@ -148,17 +148,17 @@ add_library(lib_enc ${libEncSrcs} ${libEncHeaders})
target_link_libraries(lib_enc lib_com lib_debug)
target_include_directories(lib_enc PUBLIC lib_enc PRIVATE lib_dec lib_rend)
if(INCLUDE_SPLIT)
  target_include_directories(lib_enc PRIVATE lc3plus)
  target_include_directories(lib_enc PRIVATE lib_lc3plus)
endif()

if(INCLUDE_SPLIT)
  file(GLOB libLC3plusSrcs "lc3plus/*.c")
  file(GLOB libLC3plusHeaders "lc3plus/*.h")
  file(GLOB libLC3plusSrcs "lib_lc3plus/*.c")
  file(GLOB libLC3plusHeaders "lib_lc3plus/*.h")
  add_library(lc3plus ${libLC3plusSrcs} ${libLC3plusHeaders})
  target_include_directories(lc3plus PUBLIC lc3plus)
  target_link_libraries(lc3plus lib_com) # For including options.h, which is needed for instrumentation to work correctly
  target_include_directories(lib_lc3plus PUBLIC lib_lc3plus)
  target_link_libraries(lib_lc3plus lib_com) # For including options.h, which is needed for instrumentation to work correctly
  if(WMOPS)
    target_link_libraries(lc3plus lib_debug)
  target_link_libraries(lib_lc3plus lib_debug)
  endif()
endif()

@@ -191,7 +191,7 @@ else()
endif()
target_link_libraries(lib_rend lib_dec lib_com lib_debug) # Todo refactor: This dependency on lib_dec should be removed.
if(INCLUDE_SPLIT)
  target_link_libraries(lib_rend lc3plus)
  target_link_libraries(lib_rend lib_lc3plus)
endif()
target_include_directories(lib_rend PUBLIC lib_rend PRIVATE lib_enc)

@@ -210,7 +210,7 @@ endif()
add_library(lib_util ${libUtilSrcs} ${libUtilHeaders})
target_include_directories(lib_util PUBLIC lib_util PRIVATE lib_com lib_enc lib_dec lib_rend lib_debug)
if(INCLUDE_SPLIT)
  target_include_directories(lib_util PRIVATE lc3plus)
  target_include_directories(lib_util PRIVATE lib_lc3plus)
endif()

if(INCLUDE_SPLIT)
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ SRC_LIBDEBUG = lib_debug
SRC_LIBDEC   = lib_dec
SRC_LIBENC   = lib_enc
SRC_LIBREND  = lib_rend
SRC_LC3PLUS  = lc3plus lc3plus/fft
SRC_LC3PLUS  = lib_lc3plus lib_lc3plus/fft
SRC_LIBUTIL  = lib_util
SRC_APP      = apps
BUILD        = build
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encoder", "encoder.vcxproj"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "renderer", "renderer.vcxproj", "{12B4C8A5-1E06-4E30-B443-D1F916F52B47}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LC3plus", "LC3plus.vcxproj", "{95030B82-70CD-4C6B-84D4-61096035BEA2}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LC3plus", "lib_lc3plus.vcxproj", "{95030B82-70CD-4C6B-84D4-61096035BEA2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{51160D4C-55C9-4C16-A792-D94507225746}"
	ProjectSection(SolutionItems) = preProject
Loading