ci: upgrade gcovr to the latest version

And adjust lcov invocation for lcov 2.1

Change-Id: If5a728cc42c1db6992e8229f5d4736130b82a82b
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index b94cec8..7cae86c 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -31,7 +31,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 4432716..a33970a 100755
--- a/.jenkins.d/30-coverage.sh
+++ b/.jenkins.d/30-coverage.sh
@@ -8,29 +8,36 @@
 
 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 src/ \
     --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/tests/*" \
-     --no-external \
-     --rc lcov_branch_coverage=1 \
-     --output-file build/coverage.info
+lcov \
+    --quiet \
+    --capture \
+    --directory . \
+    --include "$PWD/src/*" \
+    --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 "NLSR unit tests" \
-        build/coverage.info
+genhtml \
+    --quiet \
+    --branch-coverage \
+    --demangle-cpp \
+    --legend \
+    --missed \
+    --show-proportion \
+    --title "NLSR $(cat VERSION.info)" \
+    --output-directory build/lcov \
+    build/coverage.info