ci: auto-detect the OS instead of relying on NODE_LABELS

And remove WAF_JOBS: waf already defaults to the number of available
CPUs, which is appropriate in most cases, and we can always use the
built-in JOBS variable to override it where necessary.

Change-Id: I555dda0ccc48ee791271dbdaf4225cd1cfec4f3d
diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
index 9500206..a861528 100755
--- a/.jenkins.d/20-tests.sh
+++ b/.jenkins.d/20-tests.sh
@@ -1,12 +1,5 @@
 #!/usr/bin/env bash
-set -ex
-
-# Prepare environment
-rm -rf ~/.ndn
-
-if has OSX $NODE_LABELS; then
-    security unlock-keychain -p named-data
-fi
+set -eo pipefail
 
 # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
 ASAN_OPTIONS="color=always"
@@ -20,6 +13,7 @@
 ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
 export ASAN_OPTIONS
 
+# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
 export BOOST_TEST_BUILD_INFO=1
 export BOOST_TEST_COLOR_OUTPUT=1
 export BOOST_TEST_DETECT_MEMORY_LEAK=0
@@ -28,6 +22,11 @@
     echo --logger=HRF,test_suite,stdout:XML,all,build/xunit-log${1:+-$1}.xml
 }
 
+set -x
+
+# Prepare environment
+rm -rf ~/.ndn
+
 # First run all tests as unprivileged user
 ./build/unit-tests-core $(ut_log_args core)
 ./build/unit-tests-daemon $(ut_log_args daemon)
@@ -35,9 +34,9 @@
 ./build/unit-tests-tools $(ut_log_args tools)
 
 # Then use sudo to run those tests that need superuser powers
-sudo_preserve_env ASAN_OPTIONS BOOST_TEST_COLOR_OUTPUT -- \
+sudo --preserve-env=ASAN_OPTIONS,BOOST_TEST_COLOR_OUTPUT \
     ./build/unit-tests-daemon -t TestPrivilegeHelper $(ut_log_args daemon-privilege-helper)
-sudo_preserve_env ASAN_OPTIONS BOOST_TEST_COLOR_OUTPUT -- \
+sudo --preserve-env=ASAN_OPTIONS,BOOST_TEST_COLOR_OUTPUT \
     ./build/unit-tests-daemon -t Face/*Ethernet* $(ut_log_args daemon-ethernet)
-sudo_preserve_env ASAN_OPTIONS BOOST_TEST_COLOR_OUTPUT -- \
+sudo --preserve-env=ASAN_OPTIONS,BOOST_TEST_COLOR_OUTPUT \
     ./build/unit-tests-daemon -t Face/TestUdpFactory $(ut_log_args daemon-udp)