build+ci: Upgrade build scripts, enable coverage and sanitizer flags
Change-Id: I825ea4fdf4f40c4af06b5667af432f1c0eab368d
diff --git a/.jenkins.d/util.sh b/.jenkins.d/util.sh
new file mode 100644
index 0000000..a89bc27
--- /dev/null
+++ b/.jenkins.d/util.sh
@@ -0,0 +1,18 @@
+has() {
+ local saved_xtrace
+ [[ $- == *x* ]] && saved_xtrace=-x || saved_xtrace=+x
+ set +x
+
+ local p=$1
+ shift
+ local i ret=1
+ for i in "$@"; do
+ if [[ "${i}" == "${p}" ]]; then
+ ret=0
+ break
+ fi
+ done
+
+ set ${saved_xtrace}
+ return ${ret}
+}