ci: upgrade gcovr to the latest version
And adjust lcov invocation for lcov 2.1
Change-Id: I03156b21f2675e105a2a994d2b5f41ceecc490ec
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index 224edc6..8ca9714 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -30,7 +30,7 @@
FORMULAE=(boost openssl pkgconf)
case $JOB_NAME in
*code-coverage)
- APT_PKGS+=(lcov)
+ APT_PKGS+=(lcov libjson-xs-perl)
;;
*Docs)
APT_PKGS+=(doxygen graphviz)
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
index 740cc3b..e6867e6 100755
--- a/.jenkins.d/30-coverage.sh
+++ b/.jenkins.d/30-coverage.sh
@@ -8,31 +8,38 @@
set -x
-# Generate an XML report (Cobertura format) and a detailed HTML report using gcovr
+# Generate a detailed HTML report and an XML report in Cobertura format using gcovr
# Note: trailing slashes are important in the paths below. Do not remove them!
-uvx gcovr@5.2 \
- --object-directory build \
+uvx --from 'git+https://github.com/gcovr/gcovr@99b82e7' gcovr \
+ --decisions \
--filter ndn-cxx/ \
--exclude ndn-cxx/detail/nonstd/ \
--exclude-throw-branches \
--exclude-unreachable-branches \
--cobertura build/coverage.xml \
--html-details build/gcovr/ \
- --print-summary
+ --txt-summary \
+ build
# Generate a detailed HTML report using lcov
-lcov --quiet \
- --capture \
- --directory . \
- --exclude "$PWD/ndn-cxx/detail/nonstd/*" \
- --exclude "$PWD/tests/*" \
- --no-external \
- --rc lcov_branch_coverage=1 \
- --output-file build/coverage.info
+lcov \
+ --quiet \
+ --capture \
+ --directory . \
+ --include "$PWD/ndn-cxx/*" \
+ --exclude "$PWD/ndn-cxx/detail/nonstd/*" \
+ --ignore-errors count,inconsistent \
+ --branch-coverage \
+ --rc no_exception_branch=1 \
+ --output-file build/coverage.info
-genhtml --branch-coverage \
- --demangle-cpp \
- --legend \
- --output-directory build/lcov \
- --title "ndn-cxx unit tests" \
- build/coverage.info
+genhtml \
+ --quiet \
+ --branch-coverage \
+ --demangle-cpp \
+ --legend \
+ --missed \
+ --show-proportion \
+ --title "ndn-cxx $(cat VERSION.info)" \
+ --output-directory build/lcov \
+ build/coverage.info