Skip to content

Commit f3cc556

Browse files
committed
ci: upgrade gcovr to the latest version
And adjust lcov invocation for lcov 2.1 Change-Id: I71a4f5542ae4383010cedbc7fd86b5c6fa57ae02
1 parent 7c5e97e commit f3cc556

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

.jenkins.d/00-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ DNF_PKGS=(
3030
FORMULAE=(boost openssl pkgconf)
3131
case $JOB_NAME in
3232
*code-coverage)
33-
APT_PKGS+=(lcov)
33+
APT_PKGS+=(lcov libjson-xs-perl)
3434
;;
3535
*Docs)
3636
APT_PKGS+=(doxygen graphviz)

.jenkins.d/30-coverage.sh

+24-17
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,36 @@ export UV_NO_MANAGED_PYTHON=1
88

99
set -x
1010

11-
# Generate an XML report (Cobertura format) and a detailed HTML report using gcovr
11+
# Generate a detailed HTML report and an XML report in Cobertura format using gcovr
1212
# Note: trailing slashes are important in the paths below. Do not remove them!
13-
uvx gcovr@5.2 \
14-
--object-directory build \
13+
uvx --from 'git+https://github.com/gcovr/gcovr@99b82e7' gcovr \
14+
--decisions \
1515
--filter src/ \
1616
--exclude-throw-branches \
1717
--exclude-unreachable-branches \
1818
--cobertura build/coverage.xml \
1919
--html-details build/gcovr/ \
20-
--print-summary
20+
--txt-summary \
21+
build
2122

2223
# Generate a detailed HTML report using lcov
23-
lcov --quiet \
24-
--capture \
25-
--directory . \
26-
--exclude "$PWD/tests/*" \
27-
--no-external \
28-
--rc lcov_branch_coverage=1 \
29-
--output-file build/coverage.info
24+
lcov \
25+
--quiet \
26+
--capture \
27+
--directory . \
28+
--include "$PWD/src/*" \
29+
--ignore-errors count,inconsistent \
30+
--branch-coverage \
31+
--rc no_exception_branch=1 \
32+
--output-file build/coverage.info
3033

31-
genhtml --branch-coverage \
32-
--demangle-cpp \
33-
--legend \
34-
--output-directory build/lcov \
35-
--title "ndncert unit tests" \
36-
build/coverage.info
34+
genhtml \
35+
--quiet \
36+
--branch-coverage \
37+
--demangle-cpp \
38+
--legend \
39+
--missed \
40+
--show-proportion \
41+
--title "ndncert unit tests" \
42+
--output-directory build/lcov \
43+
build/coverage.info

0 commit comments

Comments
 (0)