blob: d34fd8803c616a190aaa0e2aa281b36edfba88dc [file] [log] [blame]
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04001#!/usr/bin/env bash
Davide Pesavento2349e282020-03-24 14:28:03 -04002set -ex
Davide Pesavento09348882016-09-17 02:39:44 +02003
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04004# Prepare environment
Davide Pesavento2349e282020-03-24 14:28:03 -04005rm -rf ~/.ndn
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04006
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -04007if has OSX $NODE_LABELS; then
Davide Pesavento09348882016-09-17 02:39:44 +02008 security unlock-keychain -p named-data
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04009fi
10
Davide Pesavento2349e282020-03-24 14:28:03 -040011# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Davide Pesavento50e20022016-09-17 18:50:27 +020012ASAN_OPTIONS="color=always"
Davide Pesavento2349e282020-03-24 14:28:03 -040013ASAN_OPTIONS+=":check_initialization_order=1"
14ASAN_OPTIONS+=":detect_stack_use_after_return=1"
15ASAN_OPTIONS+=":strict_init_order=1"
16ASAN_OPTIONS+=":strict_string_checks=1"
17ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
Davide Pesavento50e20022016-09-17 18:50:27 +020018ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
19export ASAN_OPTIONS
20
Davide Pesaventocdb5d8f2018-09-05 22:27:49 -040021export BOOST_TEST_BUILD_INFO=1
22export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesavento78338c52020-04-20 23:00:02 -040023export BOOST_TEST_DETECT_MEMORY_LEAK=0
24export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesaventocdb5d8f2018-09-05 22:27:49 -040025
Alexander Afanasyev667370f2016-08-24 11:54:53 -070026# Run unit tests
Davide Pesavento78338c52020-04-20 23:00:02 -040027./build/unit-tests