blob: 254186632cc60141f5d94d6ec0a29c946d9284a3 [file] [log] [blame]
Ashlesh Gawande0b2897e2018-06-20 14:40:47 -05001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
7set -x
8
9# Prepare environment
10rm -Rf ~/.ndn
11
12if has OSX $NODE_LABELS; then
13 security unlock-keychain -p named-data
14fi
15
16ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert -
17
18BOOST_VERSION=$(python -c "import sys; sys.path.append('build/c4che'); import _cache; print(_cache.BOOST_VERSION_NUMBER);")
19
20ut_log_args() {
21 if (( BOOST_VERSION >= 106200 )); then
22 echo --logger=HRF,test_suite,stdout:XML,all,build/xunit-${1:-report}.xml
23 else
24 if [[ -n $XUNIT ]]; then
25 echo --log_level=all $( (( BOOST_VERSION >= 106000 )) && echo -- ) \
26 --log_format2=XML --log_sink2=build/xunit-${1:-report}.xml
27 else
28 echo --log_level=test_suite
29 fi
30 fi
31}
32
33ASAN_OPTIONS="color=always"
34ASAN_OPTIONS+=":detect_stack_use_after_return=true"
35ASAN_OPTIONS+=":check_initialization_order=true"
36ASAN_OPTIONS+=":strict_init_order=true"
37ASAN_OPTIONS+=":detect_invalid_pointer_pairs=1"
38ASAN_OPTIONS+=":detect_container_overflow=false"
39ASAN_OPTIONS+=":strict_string_checks=true"
40ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
41export ASAN_OPTIONS
42
43export BOOST_TEST_COLOR_OUTPUT="yes"
44export NDN_LOG="*=DEBUG"
45
46# Run unit tests
47./build/unit-tests $(ut_log_args)