Build environment
Change-Id: I1625f5ccf69d3cb78033439c411df419b9916cb3
diff --git a/.jenkins.d/40-coverage.sh b/.jenkins.d/40-coverage.sh
new file mode 100755
index 0000000..7364c5a
--- /dev/null
+++ b/.jenkins.d/40-coverage.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+set -e
+
+JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source "$JDIR"/util.sh
+
+set -x
+
+if [[ $JOB_NAME == *"code-coverage" ]]; then
+ gcovr --object-directory=build \
+ --output=build/coverage.xml \
+ --exclude="$PWD/(build|tests)" \
+ --root=. \
+ --xml
+fi