From 87ab924e633161567e9040b0f21edb278fdae8bf Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 20 Dec 2022 15:35:46 +0100 Subject: [PATCH 1/4] Add smoke_test.sh to coverage test --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0ff4e6727..4a77db8c29 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -919,6 +919,7 @@ coverage-test-on-main-scheduled: - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - python3 -m pytest tests/test_param_file.py -v -n 0 --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec + - bash ci/smoke_test.sh - lcov -c -d obj -o coverage.info - genhtml coverage.info -o coverage artifacts: -- GitLab From 4b564db818a327ee6581504b7146f80d3c11d7c0 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 20 Dec 2022 16:09:21 +0100 Subject: [PATCH 2/4] Fix smoke test call --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a77db8c29..e16dc0096c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -919,7 +919,8 @@ coverage-test-on-main-scheduled: - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - python3 -m pytest tests/test_param_file.py -v -n 0 --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - - bash ci/smoke_test.sh + - python3 scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U 1 -t 1 + - python3 scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U 1 -D="-fec 15" --decoder_only -t 1 - lcov -c -d obj -o coverage.info - genhtml coverage.info -o coverage artifacts: -- GitLab From c106560e0d33380c257d7b87d20cca56203078f6 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Wed, 21 Dec 2022 06:48:05 +0100 Subject: [PATCH 3/4] Adapted smoke_test.sh for coverage test and added external_renderer test --- .gitlab-ci.yml | 5 +++-- ci/smoke_test.sh | 36 ++++++++++++++++++++++++++++++------ 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd07eb242f..3ac60dac7e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -928,12 +928,13 @@ coverage-test-on-main-scheduled: script: - *print-common-info - make GCOV=1 -j + - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run external renderer script - python3 tests/create_short_testvectors.py - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - python3 -m pytest tests/test_param_file.py -v -n 0 --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - - python3 scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U 1 -t 1 - - python3 scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U 1 -D="-fec 15" --decoder_only -t 1 + - bash ci/smoke_test.sh coverage + - python3 -m pytest -q -n auto tests/renderer/test_renderer_be_comparison.py - lcov -c -d obj -o coverage.info - genhtml coverage.info -o coverage artifacts: diff --git a/ci/smoke_test.sh b/ci/smoke_test.sh index 5ba890c443..1b36c8d20e 100755 --- a/ci/smoke_test.sh +++ b/ci/smoke_test.sh @@ -28,20 +28,44 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. +function usage { + echo + echo "Usage:" + echo " smoke_test.sh [MODE]" + echo + echo " MODE - test (default) or coverage" + exit +} + if [ ! -d "lib_com" ]; then echo "not in root directory! - please run in IVAS root" exit 1 fi +if [ -z "$1" ]; then + WORKERS="" + SKIP_BUILD=0 +else + if [ "$1" == "coverage" ]; then + WORKERS="-t 1" + SKIP_BUILD=1 + else + usage + fi +fi + + cfg=./scripts/config/ci_linux.json dly_profile=./scripts/dly_error_profiles/dly_error_profile_10.dat -make clean -make all -j 8 +if [ $SKIP_BUILD -eq 0 ];then + make clean + make all -j 8 +fi -./scripts/runIvasCodec.py -p $cfg -U 1 | tee smoke_test_output.txt -./scripts/runIvasCodec.py -p $cfg -U 1 -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt +./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt +./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt modes_with_no_ext_out=$(./scripts/runIvasCodec.py -l | grep -v MASA | grep -v ISM) -./scripts/runIvasCodec.py -m $modes_with_no_ext_out -p $cfg -U 1 --decoder_only --jbm_file $dly_profile | tee smoke_test_output_jbm_noEXT.txt -./scripts/runIvasCodec.py -C MASA ISM1 ISM2 ISM3 ISM4 -p $cfg -U 1 --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM mono stereo FOA HOA3 5_1 7_1_4 | tee -a smoke_test_output_jbm_noEXT.txt \ No newline at end of file +./scripts/runIvasCodec.py -m $modes_with_no_ext_out -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile | tee smoke_test_output_jbm_noEXT.txt +./scripts/runIvasCodec.py -C MASA ISM1 ISM2 ISM3 ISM4 -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM mono stereo FOA HOA3 5_1 7_1_4 | tee -a smoke_test_output_jbm_noEXT.txt \ No newline at end of file -- GitLab From 0dbcfdfd2512ee64921124d9c518efe9d22e9b6f Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Wed, 21 Dec 2022 13:24:16 +0100 Subject: [PATCH 4/4] Fixes in smoke_test.sh for test argument and BUILD logic --- ci/smoke_test.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/ci/smoke_test.sh b/ci/smoke_test.sh index 1b36c8d20e..0963055acd 100755 --- a/ci/smoke_test.sh +++ b/ci/smoke_test.sh @@ -42,23 +42,21 @@ if [ ! -d "lib_com" ]; then exit 1 fi -if [ -z "$1" ]; then +if [ -z "$1" ] || [ "$1" == "test" ]; then WORKERS="" - SKIP_BUILD=0 + BUILD=1 +elif [ "$1" == "coverage" ]; then + WORKERS="-t 1" + BUILD=0 else - if [ "$1" == "coverage" ]; then - WORKERS="-t 1" - SKIP_BUILD=1 - else - usage - fi + usage fi cfg=./scripts/config/ci_linux.json dly_profile=./scripts/dly_error_profiles/dly_error_profile_10.dat -if [ $SKIP_BUILD -eq 0 ];then +if [ $BUILD -eq 1 ];then make clean make all -j 8 fi -- GitLab