Loading .gitlab-ci.yml +47 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ variables: EXIT_CODE_NON_BE: 123 EXIT_CODE_FAIL: 1 TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" LEVEL_SCALING: 1.0 IVAS_PIPELINE_NAME: '' MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'pytest-mld' to run MLD test against reference float codec." # Not implemented yet, but may be good to have a manual pipeline trigger Loading Loading @@ -69,6 +70,10 @@ stages: .remove-unsupported-testcases: &remove-unsupported-testcases - sed -i '1629,1635d' scripts/config/self_test.prm .apply-testv-scaling: &apply-testv-scaling - echo "Applying level scaling in scripts/testv using scale=$LEVEL_SCALING" - for file in `ls ./scripts/testv/*.wav`; do tests/scale_pcm.py $file tmp.wav $LEVEL_SCALING; mv tmp.wav $file;done # --------------------------------------------------------------- # Job templates # --------------------------------------------------------------- Loading Loading @@ -186,3 +191,45 @@ ivas-pytest-mld-dec: reports: junit: - report-junit.xml ivas-pytest-mld-dec-lev-10: extends: - .test-job-linux stage: test needs: ["build-codec-linux-make"] timeout: "30 minutes" script: - *print-common-info - *update-scripts-repo - *remove-unsupported-testcases - *mld-test-setup-codec - LEVEL_SCALING=0.3162 # -10 dB, 10^(-10/20) - *apply-testv-scaling ### run pytest - exit_code=0 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld --dut_encoder_path ./IVAS_cod_ref -n auto || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - python3 scripts/parse_mld.py report.html mld.csv - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ]; then echo "Differences encountered"; exit $EXIT_CODE_NON_BE; fi - exit 0 allow_failure: exit_codes: - 123 artifacts: name: "mld--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" expire_in: 1 week when: always paths: - report-junit.xml - report.html - mld.csv expose_as: "pytest mld results" reports: junit: - report-junit.xml Loading
.gitlab-ci.yml +47 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ variables: EXIT_CODE_NON_BE: 123 EXIT_CODE_FAIL: 1 TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" LEVEL_SCALING: 1.0 IVAS_PIPELINE_NAME: '' MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'pytest-mld' to run MLD test against reference float codec." # Not implemented yet, but may be good to have a manual pipeline trigger Loading Loading @@ -69,6 +70,10 @@ stages: .remove-unsupported-testcases: &remove-unsupported-testcases - sed -i '1629,1635d' scripts/config/self_test.prm .apply-testv-scaling: &apply-testv-scaling - echo "Applying level scaling in scripts/testv using scale=$LEVEL_SCALING" - for file in `ls ./scripts/testv/*.wav`; do tests/scale_pcm.py $file tmp.wav $LEVEL_SCALING; mv tmp.wav $file;done # --------------------------------------------------------------- # Job templates # --------------------------------------------------------------- Loading Loading @@ -186,3 +191,45 @@ ivas-pytest-mld-dec: reports: junit: - report-junit.xml ivas-pytest-mld-dec-lev-10: extends: - .test-job-linux stage: test needs: ["build-codec-linux-make"] timeout: "30 minutes" script: - *print-common-info - *update-scripts-repo - *remove-unsupported-testcases - *mld-test-setup-codec - LEVEL_SCALING=0.3162 # -10 dB, 10^(-10/20) - *apply-testv-scaling ### run pytest - exit_code=0 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld --dut_encoder_path ./IVAS_cod_ref -n auto || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - python3 scripts/parse_mld.py report.html mld.csv - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ]; then echo "Differences encountered"; exit $EXIT_CODE_NON_BE; fi - exit 0 allow_failure: exit_codes: - 123 artifacts: name: "mld--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" expire_in: 1 week when: always paths: - report-junit.xml - report.html - mld.csv expose_as: "pytest mld results" reports: junit: - report-junit.xml