blob: ea5f998d4324dbb4348143db10061560c764993f [file] [log] [blame]
Yingdi Yu906c2ea2014-10-31 11:24:50 -07001#!/usr/bin/env bash
Davide Pesavento15a74422022-08-19 15:48:45 -04002set -eo pipefail
Alexander Afanasyevf3192eb2016-12-19 17:11:20 -08003
Davide Pesaventoc6cfed62024-02-09 21:18:06 -05004# https://github.com/google/sanitizers/wiki/SanitizerCommonFlags
Davide Pesaventoa0546db2020-04-01 19:18:04 -04005# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Alexander Afanasyevf3192eb2016-12-19 17:11:20 -08006ASAN_OPTIONS="color=always"
Davide Pesaventoc6cfed62024-02-09 21:18:06 -05007ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
Davide Pesaventoa0546db2020-04-01 19:18:04 -04008ASAN_OPTIONS+=":check_initialization_order=1"
9ASAN_OPTIONS+=":detect_stack_use_after_return=1"
10ASAN_OPTIONS+=":strict_init_order=1"
11ASAN_OPTIONS+=":strict_string_checks=1"
12ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
Alexander Afanasyevf3192eb2016-12-19 17:11:20 -080013export ASAN_OPTIONS
14
Davide Pesavento15a74422022-08-19 15:48:45 -040015# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesavento5188f312019-03-18 18:38:45 -040016export BOOST_TEST_BUILD_INFO=1
17export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesavento5f408ae2020-07-15 21:17:04 -040018export BOOST_TEST_DETECT_MEMORY_LEAK=0
19export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesaventoc2489b42017-10-28 17:19:08 -040020
Davide Pesavento15a74422022-08-19 15:48:45 -040021set -x
22
23# Prepare environment
24rm -rf ~/.ndn
25
Davide Pesavento7ef57e22017-10-28 16:58:43 -040026# Run unit tests
Davide Pesavento5f408ae2020-07-15 21:17:04 -040027./build/unit-tests