a0546dbc86
Also in this commit: * Sync CI scripts with other projects * Modernize docs/conf.py * Cleanup README.md * Use the official markdown version of the GPLv3 Refs: #5095 Change-Id: Ie607fcde1f6e41fa5efbbb41b21cb08583017442
43 lines
1.2 KiB
Bash
Executable File
43 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -ex
|
|
|
|
# Prepare environment
|
|
rm -rf ~/.ndn
|
|
|
|
if has OSX $NODE_LABELS; then
|
|
security unlock-keychain -p named-data
|
|
fi
|
|
|
|
ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert -
|
|
|
|
BOOST_VERSION=$(python3 -c "import sys; sys.path.append('build/c4che'); import _cache; print(_cache.BOOST_VERSION_NUMBER);")
|
|
|
|
ut_log_args() {
|
|
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
|
|
}
|
|
|
|
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
|
|
ASAN_OPTIONS="color=always"
|
|
ASAN_OPTIONS+=":check_initialization_order=1"
|
|
ASAN_OPTIONS+=":detect_stack_use_after_return=1"
|
|
ASAN_OPTIONS+=":strict_init_order=1"
|
|
ASAN_OPTIONS+=":strict_string_checks=1"
|
|
ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
|
|
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 $(ut_log_args)
|