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/20-tests.sh b/.jenkins.d/20-tests.sh
new file mode 100755
index 0000000..ab404ae
--- /dev/null
+++ b/.jenkins.d/20-tests.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+set -x
+
+# Prepare environment
+rm -Rf ~/.ndnx ~/.ndn
+
+echo $NODE_LABELS
+IS_OSX=$( python -c "print 'yes' if 'OSX' in '$NODE_LABELS'.strip().split(' ') else 'no'" )
+
+if [[ $IS_OSX == "yes" ]]; then
+  echo "Unlocking OSX Keychain"
+  security unlock-keychain -p "named-data"
+fi
+
+ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert -
+
+# Run unit tests
+./build/unit-tests -l test_suite