blob: fb5d2dc41a170f4eede6f8e9e65f0f05488f8447 [file] [log] [blame]
Alexander Afanasyev21034bf2014-09-02 18:31:53 -07001#!/usr/bin/env bash
Davide Pesaventofee7ee32020-04-15 02:45:07 -04002set -ex
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -08003
Shock Jiangcde28712014-10-19 21:17:20 -07004# Prepare environment
Davide Pesaventofee7ee32020-04-15 02:45:07 -04005rm -rf ~/.ndn
Shock Jiangcde28712014-10-19 21:17:20 -07006
Alexander Afanasyevc7c99002015-10-09 17:27:30 -07007if has OSX $NODE_LABELS; then
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -08008 security unlock-keychain -p named-data
Shock Jiangcde28712014-10-19 21:17:20 -07009fi
10
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -080011ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert -
12
Davide Pesaventofee7ee32020-04-15 02:45:07 -040013# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -080014ASAN_OPTIONS="color=always"
Davide Pesaventofee7ee32020-04-15 02:45:07 -040015ASAN_OPTIONS+=":check_initialization_order=1"
16ASAN_OPTIONS+=":detect_stack_use_after_return=1"
17ASAN_OPTIONS+=":strict_init_order=1"
18ASAN_OPTIONS+=":strict_string_checks=1"
19ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -080020ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
21export ASAN_OPTIONS
22
Davide Pesavento4a315b32018-11-24 14:32:19 -050023export BOOST_TEST_BUILD_INFO=1
24export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesaventobdd88c12020-11-26 00:35:08 -050025export BOOST_TEST_DETECT_MEMORY_LEAK=0
26export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesavento4a315b32018-11-24 14:32:19 -050027
28# Run unit tests
Davide Pesaventobdd88c12020-11-26 00:35:08 -050029./build/unit-tests