blob: 5490d0f7bbfd76227ac9801d566cc4ed6c332ccf [file] [log] [blame]
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -07001#!/usr/bin/env bash
Davide Pesaventoede59632022-08-26 20:35:44 -04002set -eo pipefail
Davide Pesavento813df802017-08-20 20:53:54 -04003
Davide Pesaventof6be8e32020-04-30 16:06:03 -04004# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Davide Pesaventoc58cc7f2017-08-08 16:51:28 -05005ASAN_OPTIONS="color=always"
Davide Pesaventof6be8e32020-04-30 16:06:03 -04006ASAN_OPTIONS+=":check_initialization_order=1"
7ASAN_OPTIONS+=":detect_stack_use_after_return=1"
8ASAN_OPTIONS+=":strict_init_order=1"
9ASAN_OPTIONS+=":strict_string_checks=1"
10ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
11ASAN_OPTIONS+=":detect_container_overflow=0"
Davide Pesaventoc58cc7f2017-08-08 16:51:28 -050012ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
13export ASAN_OPTIONS
14
Davide Pesaventoede59632022-08-26 20:35:44 -040015# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040016export BOOST_TEST_BUILD_INFO=1
17export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesavento7ae8b082021-10-12 21:45:47 -040018export BOOST_TEST_DETECT_MEMORY_LEAK=0
19export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040020
Davide Pesaventoede59632022-08-26 20:35:44 -040021set -x
22
23# Prepare environment
24rm -rf ~/.ndn
25
Davide Pesavento813df802017-08-20 20:53:54 -040026# Run unit tests
Davide Pesavento7ae8b082021-10-12 21:45:47 -040027./build/unit-tests-nlsr