ci: Also compile C++ files with coverage collection

This commit is contained in:
Marco Trevisan (Treviño) 2024-07-24 11:34:44 +02:00
parent 24ec28a9a6
commit 2f938054e9
2 changed files with 6 additions and 1 deletions

View File

@ -174,7 +174,8 @@ fedora-x86_64:
stage: build stage: build
needs: [] needs: []
variables: variables:
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs -fprofile-update=atomic" CFLAGS: "--coverage -ftest-coverage -fprofile-arcs -fprofile-update=atomic"
CXXFLAGS: "--coverage -ftest-coverage -fprofile-arcs -fprofile-update=atomic"
before_script: before_script:
- !reference [".build-linux", "before_script"] - !reference [".build-linux", "before_script"]
- !reference [".with-git", "before_script"] - !reference [".with-git", "before_script"]

View File

@ -4,6 +4,10 @@
# Always enable branch coverage # Always enable branch coverage
lcov_branch_coverage = 1 lcov_branch_coverage = 1
# Disable exception branch for C++:
# https://github.com/linux-test-project/lcov/issues/209
no_exception_branch = 1
# Exclude precondition assertions, as we can never reasonably get full branch # Exclude precondition assertions, as we can never reasonably get full branch
# coverage of them, as they should never normally fail. # coverage of them, as they should never normally fail.
# Similarly exclude g_clear_*() functions (such as g_clear_object(), # Similarly exclude g_clear_*() functions (such as g_clear_object(),