ci: update .travis.yml and jenkins scripts

Change-Id: I315196cb9d8e96f46e706a78c2d15d856a0a8d8b
diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
index b172b2a..2657aa9 100755
--- a/.jenkins.d/20-tests.sh
+++ b/.jenkins.d/20-tests.sh
@@ -1,12 +1,27 @@
 #!/usr/bin/env bash
 set -e
+
+JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source "$JDIR"/util.sh
+
 set -x
 
 # Prepare environment
 rm -Rf ~/.ndn
 
+BOOST_VERSION=$(python -c "import sys; sys.path.append('build/c4che'); import _cache; print(_cache.BOOST_VERSION_NUMBER);")
+
 ut_log_args() {
-    echo --log_level=test_suite
+    if (( BOOST_VERSION >= 106200 )); then
+        echo --logger=HRF,test_suite,stdout:XML,all,build/xunit-${1:-report}.xml
+    else
+        if [[ -n $XUNIT ]]; then
+            echo --log_level=all $( (( BOOST_VERSION >= 106000 )) && echo -- ) \
+                 --log_format2=XML --log_sink2=build/xunit-${1:-report}.xml
+        else
+            echo --log_level=test_suite
+        fi
+    fi
 }
 
 ASAN_OPTIONS="color=always"
@@ -19,5 +34,8 @@
 ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
 export ASAN_OPTIONS
 
+export BOOST_TEST_BUILD_INFO=1
+export BOOST_TEST_COLOR_OUTPUT=1
+
 # Run unit tests
 ./build/unit-tests-nlsr $(ut_log_args)