Commit 7e6b6bad authored by norvell's avatar norvell
Browse files

Merge branch 'add-saturation-smoke-test' into 'main'

[CI] Add saturation smoke test job

See merge request !201
parents ae70e60a c326a5ad
Loading
Loading
Loading
Loading
Loading
+59 −2
Original line number Diff line number Diff line
variables:
  TESTV_DIR: "/usr/local/testv"
  LTV_DIR: "/usr/local/ltv"
  EVS_BE_TEST_DIR_BASOP: "/usr/local/be_2_evs_basop"
  REFERENCE_TAG: "20231128_Update_Ittiam"
@@ -21,6 +22,7 @@ variables:
      - 'default'
      - 'pytest-mld'
      - 'pytest-mld-long'
      - 'pytest-saturation-smoke-test'
      - 'evs-26444'
      - 'sanitizer-stv'

@@ -49,6 +51,9 @@ workflow:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-mld-long'
      variables:
        IVAS_PIPELINE_NAME: 'Run MLD tool against float ref (long test vectors): $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-saturation-smoke-test'
      variables:
        IVAS_PIPELINE_NAME: 'Run saturation smoke-test: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'evs-26444'
      variables:
        IVAS_PIPELINE_NAME: 'EVS 26.444 test: $CI_COMMIT_BRANCH'
@@ -153,6 +158,15 @@ stages:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
      when: never

.rules-pytest-saturation-smoke-test:
  rules:
    - if: $PYTEST_SMOKE_TEST # Set by scheduled pipeline
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-saturation-smoke-test"
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
      when: never

# ---------------------------------------------------------------
# Job templates
# ---------------------------------------------------------------
@@ -173,6 +187,7 @@ stages:
.test-job-linux-needs-testv-dir:
  extends: .test-job-linux
  before_script:
    - *update-scripts-repo
    - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi
    - cp -r scripts/testv/* $TESTV_DIR/

@@ -215,7 +230,7 @@ stages:
    exit_codes:
      - 123
  artifacts:
    name: "mld--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    name: "mld--sha-$CI_COMMIT_SHORT_SHA--results"
    expire_in: 1 week
    when: always
    paths:
@@ -456,6 +471,48 @@ ivas-pytest-mld-long-dec-lev+10:
    - LEVEL_SCALING=3.162
  <<: *ivas-pytest-mld-anchor

ivas-smoke-test-saturation:
  extends:
    - .rules-pytest-saturation-smoke-test
    - .test-job-linux-needs-testv-dir
  script:
    - USE_LTV=1
    - LEVEL_SCALING=32768

    - *print-common-info
    - *update-scripts-repo
    - if [ $USE_LTV -eq 1 ]; then
    -    *update-ltv-repo
    -    *copy-ltv-files-to-testv-dir
    - fi
    - if [ $LEVEL_SCALING != "1.0" ];then
    -   *apply-testv-scaling
    - fi
    - cp -r scripts/testv/* $TESTV_DIR/

    # skip prepare_mem_dryrun.py script in smoke_test.sh
    - sed -i 's/python3 .\/scripts\/prepare_mem_dryrun.py/#python3 .\/scripts\/prepare_mem_dryrun.py/g' ci/smoke_test.sh

    - bash ci/smoke_test.sh
    ### analyze for failures
    - if ! [ -s smoke_test_output.txt ] || ! [ -s smoke_test_output_plc.txt ] || ! [ -s smoke_test_output_jbm_noEXT.txt ] || ! [ -s smoke_test_output_hrtf.txt ]; then echo "Error in smoke test"; exit 1; fi
    - ret_val=0
    - if cat smoke_test_output.txt | grep -c "failed" ; then echo "Smoke test without PLC failed"; ret_val=1; fi
    - if cat smoke_test_output_plc.txt | grep -c "failed"; then echo "Smoke test with PLC failed"; ret_val=1; fi
    - if cat smoke_test_output_jbm_noEXT.txt | grep -c "failed"; then echo "Smoke test JBM part failed"; ret_val=1; fi
    - if cat smoke_test_output_hrtf.txt | grep -c "failed"; then echo "Smoke test with external hrtf files failed"; ret_val=1; fi
    - exit $ret_val
  artifacts:
    name: "ivas-smoke-test-saturation--sha-$CI_COMMIT_SHORT_SHA--results"
    expire_in: 1 week
    when: always
    paths:
      - smoke_test_output.txt
      - smoke_test_output_plc.txt
      - smoke_test_output_jbm_noEXT.txt
      - smoke_test_output_hrtf.txt
    expose_as: "saturation smoke test results"

# ---------------------------------------------------------------
# EVS 26.444 test job
# ---------------------------------------------------------------
@@ -485,7 +542,7 @@ be-2-evs-26444:
    - exit 0
    
  artifacts:
    name: "evs-26444--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    name: "evs-26444--sha-$CI_COMMIT_SHORT_SHA--results"
    expire_in: 1 week
    when: always
    paths: