From e60e8abf0b5d7809db401b86180547cc01bdff51 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Wed, 18 Mar 2026 11:23:41 +0100 Subject: [PATCH 1/5] Add llvm-cov tool for clang coverage --- snippets/collect-coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/collect-coverage.sh b/snippets/collect-coverage.sh index 93977be..0a377a2 100644 --- a/snippets/collect-coverage.sh +++ b/snippets/collect-coverage.sh @@ -60,7 +60,7 @@ if [[ -z "$obj_dir" || -z "$output_file" || -z "$output_dir" || -z "$title" ]]; fi # Capture coverage -lcov -c -d "$obj_dir" -o "$output_file" +lcov -c -d "$obj_dir" -o "$output_file" -gcov-tool llvm-cov -gcov-tool gcov # Remove apps, lib_debug and lib_util files from coverage lcov -r "$output_file" "*apps*" -o "$output_file" -- GitLab From 4e21360ebbae7335b38bc53c074e54dbe072aa5f Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 23 Mar 2026 11:19:28 +0100 Subject: [PATCH 2/5] rename GCOV -> COVERAGE --- main-basop.yml | 6 +++--- main-float.yml | 8 ++++---- snippets/ivas-conformance.sh | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/main-basop.yml b/main-basop.yml index e6dead6..1908c67 100644 --- a/main-basop.yml +++ b/main-basop.yml @@ -2302,7 +2302,7 @@ ivas-smoke-test-saturation: expose_as: "saturation smoke test results" -# GCOV/LCOV coverage analysis of self_test suite +# coverage analysis of self_test suite coverage-test-on-main-scheduled: extends: - .test-job-linux @@ -2312,9 +2312,9 @@ coverage-test-on-main-scheduled: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh - # Build DuT binaries with GCOV + # Build DuT binaries with coverage instrumentation - make clean >> /dev/null - - make GCOV=1 -j 2>&1 >$MAKE_BUILD_LOG_FILE_DEFAULT + - make COVERAGE=1 -j 2>&1 >$MAKE_BUILD_LOG_FILE_DEFAULT - cp IVAS_rend IVAS_rend_ref # Copy to ensure instrumented renderer is run in ref creation call - testcase_timeout=$TESTCASE_TIMEOUT_LTV diff --git a/main-float.yml b/main-float.yml index 34a5260..74acec5 100644 --- a/main-float.yml +++ b/main-float.yml @@ -1416,9 +1416,9 @@ ivas-conformance-linux: - cp Readme_IVAS_ISAR_dec.txt testvec - cp Readme_IVAS_ISAR_post_rend.txt testvec - # Create GCOV execs for coverage analysis + # Create coverage instrumented execs for coverage analysis - make clean - - make GCOV=1 -j 2>&1 >$MAKE_BUILD_LOG_FILE_DEFAULT + - make COVERAGE=1 -j 2>&1 >$MAKE_BUILD_LOG_FILE_DEFAULT - cp IVAS_cod testvec/bin - cp IVAS_dec testvec/bin @@ -2181,7 +2181,7 @@ sanitizer-test-osba-planar-hoa3-ism4: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS -# GCOV/LCOV coverage analysis of self_test suite +# coverage analysis of self_test suite .coverage-test-template: extends: - .test-job-linux-needs-testv-dir @@ -2200,7 +2200,7 @@ sanitizer-test-osba-planar-hoa3-ism4: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh # compile with coverage enabled - - cmake -B cmake-build -G "Unix Makefiles" -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true -DGCOV=ON + - cmake -B cmake-build -G "Unix Makefiles" -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true -DCOVERAGE=ON - cmake --build cmake-build -- -j # copy executables to ref to be able to run some --create_ref tests - cp IVAS_cod IVAS_cod_ref diff --git a/snippets/ivas-conformance.sh b/snippets/ivas-conformance.sh index 4dbfa95..2de08bf 100644 --- a/snippets/ivas-conformance.sh +++ b/snippets/ivas-conformance.sh @@ -43,9 +43,9 @@ cp Readme_IVAS_JBM_dec.txt testvec cp Readme_IVAS_ISAR_dec.txt testvec cp Readme_IVAS_ISAR_post_rend.txt testvec -# Create GCOV execs for coverage analysis +# Create coverage instrumented execs for coverage analysis make clean -make GCOV=1 -j +make COVERAGE=1 -j cp IVAS_cod testvec/bin cp IVAS_dec testvec/bin -- GitLab From 207ce65dedb07d003ed7e85a0a6aa3c35162dee2 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 23 Mar 2026 11:38:20 +0100 Subject: [PATCH 3/5] double dashes for long argument names --- snippets/collect-coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/collect-coverage.sh b/snippets/collect-coverage.sh index 0a377a2..1f1e89c 100644 --- a/snippets/collect-coverage.sh +++ b/snippets/collect-coverage.sh @@ -60,7 +60,7 @@ if [[ -z "$obj_dir" || -z "$output_file" || -z "$output_dir" || -z "$title" ]]; fi # Capture coverage -lcov -c -d "$obj_dir" -o "$output_file" -gcov-tool llvm-cov -gcov-tool gcov +lcov -c -d "$obj_dir" -o "$output_file" --gcov-tool llvm-cov --gcov-tool gcov # Remove apps, lib_debug and lib_util files from coverage lcov -r "$output_file" "*apps*" -o "$output_file" -- GitLab From c20ae7e0bc14b3de5425c860bdb0db809406b2e0 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 24 Mar 2026 09:05:01 +0100 Subject: [PATCH 4/5] adjust build jobs to new Makefile/CMakeLists.txt --- includes/build-jobs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/build-jobs.yml b/includes/build-jobs.yml index ae353db..36a9eee 100644 --- a/includes/build-jobs.yml +++ b/includes/build-jobs.yml @@ -19,7 +19,7 @@ build-codec-linux-clang-make: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - - make -j CLANG=0 + - make -j build-codec-linux-gcc-make: rules: @@ -37,7 +37,7 @@ build-codec-linux-gcc-make: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - - make -j + - make -j GCC=1 # ensure that codec builds on linux with cmake build-codec-linux-clang-cmake: @@ -59,7 +59,7 @@ build-codec-linux-clang-cmake: bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh fi - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=0 + - cmake -B cmake-build -G "Unix Makefiles" - cmake --build cmake-build -- -j # ensure that codec builds on linux with instrumentation active @@ -85,7 +85,7 @@ build-codec-linux-instrumented-clang-make: INSTRUMENTATION_ARGS="-m MEM_ONLY" fi - bash scripts/prepare_instrumentation.sh $INSTRUMENTATION_ARGS - - make -j -C $INSTR_DIR CLANG=0 + - make -j -C $INSTR_DIR # make sure that the codec builds with msan, asan and usan build-codec-sanitizers-clang-linux: @@ -125,7 +125,7 @@ build-codec-linux-debugging-clang-make: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/enable-debugging-macro.sh - - make -j CLANG=0 + - make -j build-codec-windows-msbuild: rules: -- GitLab From ed4cc0fa571b954fb318070218250d4f811b4d7c Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 24 Mar 2026 09:22:03 +0100 Subject: [PATCH 5/5] set gcc compiler via env var --- includes/build-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/build-jobs.yml b/includes/build-jobs.yml index 36a9eee..b8081eb 100644 --- a/includes/build-jobs.yml +++ b/includes/build-jobs.yml @@ -37,7 +37,7 @@ build-codec-linux-gcc-make: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - - make -j GCC=1 + - CC=gcc make -j # ensure that codec builds on linux with cmake build-codec-linux-clang-cmake: -- GitLab