ci: Embedding CI build and test running script

This commit also unifies build and test scripts for Jenkins and Travis CI

Change-Id: I6ee99c51032769629eb2c62b40608033fa9cac78
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
new file mode 100755
index 0000000..7b8f1af
--- /dev/null
+++ b/.jenkins.d/30-coverage.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+set -x
+
+IS_COVR=$( python -c "print 'yes' if 'code-coverage' in '$JOB_NAME' else 'no'" )
+
+if [[ $IS_COVR == "yes" ]]; then
+  BASE="`pwd | sed -e 's|/|\\\/|g'`\\"
+  (cd build && gcovr -x -f $BASE/src -r ../ -o coverage.xml -b ./)
+fi