Commit 26a125ff authored by norvell's avatar norvell
Browse files

Add ivas-conformance-linux job

parent 54f2f9de
Loading
Loading
Loading
Loading
Loading
+88 −0
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
@@ -243,6 +248,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:
@@ -1401,6 +1408,87 @@ ivas-conformance:
    reports:
      junit: report-junit.xml

ivas-conformance-linux:
  tags:
    - ivas-linux
  stage: test
  timeout: "60 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
    # 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
    - python3 .\scripts\strip_split_rendering.py
    
    - make -j
    - cp IVAS_cod IVAS_cod_ref
    - cp IVAS_dec IVAS_dec_ref
    - cp IVAS_rend IVAS_rend_ref
    - git restore .
    - git checkout $source_branch_commit_sha
    
    # Reference creation
    - python3 tests/create_short_testvectors.py
    - python3 scripts/prepare_combined_format_inputs.py
    - python3 -m pytest tests/codec_be_on_mr_nonselection -v -n auto --update_ref 1 -m create_ref --keep_files
    - python3 -m pytest tests/codec_be_on_mr_nonselection -v -n auto --update_ref 1 -m create_ref_part2 --keep_files
    - python3 -m pytest tests/renderer/test_renderer.py --create_ref --keep_files

    # Output creation
    - python3 -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
    - 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/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/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 IVAS_cod.exe testvec/bin
    - cp IVAS_dec.exe testvec/bin
    - cp IVAS_rend.exe testvec/bin
    
    # Test run generated scripts in testvec
    - cd testvec    
    - python3 -m pytest conformance-test/test_26252.py --junit-xml=report-junit.xml --html=report.html --self-contained-html
    - mv report.html ..
    - mv report-junit.xml ..

  artifacts:
    name: "ivas-conformance-linux-$CI_COMMIT_SHORT_SHA"
    expire_in: 1 week
    when: always
    paths:
      - report-junit.xml
      - report.html
      - Readme_IVAS_dec.txt  
      - Readme_IVAS_enc.txt  
      - Readme_IVAS_rend.txt
      - Readme_IVAS_JBM_dec.txt
    expose_as: "Draft IVAS conformance -- Linux"
    reports:
      junit: report-junit.xml


test-long-self-test:
  tags:
    - ivas-linux-fast