tests+ci: Add and enable a partial unit test coverage

Change-Id: I6dbc5cf4d68679bd6f943322f572313884c8aef7
Refs: #2369
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index 93e7d79..da977d5 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -2,38 +2,27 @@
 set -x
 set -e
 
-# git submodule init
-# git submodule sync
-# git submodule update
+JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source "$JDIR"/util.sh
 
-# COVERAGE=$( python -c "print '--with-coverage' if 'code-coverage' in '$JOB_NAME' else ''" )
-IS_UBUNTU_12_04=$( python -c "print 'yes' if 'Ubuntu-12.04' in '$NODE_LABELS'.strip().split(' ') else 'no'" )
-if [[ $IS_UBUNTU_12_04 == "yes" ]]; then
-    EXTRA_FLAGS=" --boost-libs=/usr/lib/x86_64-linux-gnu"
-fi
+git submodule update --init
 
 # Cleanup
 sudo ./waf -j1 distclean
 
+if has Ubuntu-12.04 $NODE_LABELS; then
+    EXTRA_FLAGS=" --boost-libs=/usr/lib/x86_64-linux-gnu"
+fi
+
 # Configure/build in debug mode
-./waf -j1 configure --enable-modules=ndnSIM --enable-examples --enable-tests $EXTRA_FLAGS
+./waf -j1 configure -d debug --enable-modules=ndnSIM --enable-examples --enable-tests $EXTRA_FLAGS
 ./waf -j1 build
 
-# # Cleanup
-# sudo ./waf -j1 --color=yes distclean
+# Install
+sudo ./waf -j1 install
 
-# # Configure/build in optimized mode without tests with precompiled headers
-# ./waf -j1 --color=yes configure
-# ./waf -j1 --color=yes build
-
-# # Cleanup
-# sudo ./waf -j1 --color=yes distclean
-
-# # Configure/build in optimized mode
-# ./waf -j1 --color=yes configure --with-tests --without-pch $COVERAGE
-# ./waf -j1 --color=yes build
-
-# # (tests will be run against optimized version)
-
-# # Install
-# sudo ./waf -j1 --color=yes install
+if has Linux $NODE_LABELS; then
+    sudo ldconfig
+elif has FreeBSD $NODE_LABELS; then
+    sudo ldconfig -a
+fi