ci: improve lcov HTML output

In particular, demangle C++ symbols in the function coverage view.

Change-Id: Ib8fd78a75cd79795795a040816da839775a11f53
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index 41b93f0..468075a 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -17,4 +17,9 @@
     sudo apt-get -qq update
     sudo apt-get -qq install build-essential pkg-config libboost-all-dev \
                              libcrypto++-dev libsqlite3-dev libssl-dev
+
+    if [[ $JOB_NAME == *"code-coverage" ]]; then
+        sudo apt-get -qq install lcov libgd-perl python-setuptools
+        sudo easy_install --upgrade gcovr
+    fi
 fi
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
index 5080266..5910069 100755
--- a/.jenkins.d/30-coverage.sh
+++ b/.jenkins.d/30-coverage.sh
@@ -15,8 +15,9 @@
 
     # Generate also a detailed HTML output, but using lcov (better results)
     lcov --quiet \
-         --capture --no-external \
+         --capture \
          --directory . \
+         --no-external \
          --rc lcov_branch_coverage=1 \
          --output-file build/coverage-with-tests.info
 
@@ -25,8 +26,11 @@
          --rc lcov_branch_coverage=1 \
          --output-file build/coverage.info
 
-    genhtml --legend \
-            --rc genhtml_branch_coverage=1 \
-            build/coverage.info \
-            --output-directory build/coverage
+    genhtml --branch-coverage \
+            --demangle-cpp \
+            --frames \
+            --legend \
+            --output-directory build/coverage \
+            --title "ndn-cxx unit tests" \
+            build/coverage.info
 fi