blob: ea5f998d4324dbb4348143db10061560c764993f [file] [log] [blame]
Alexander Afanasyev21034bf2014-09-02 18:31:53 -07001#!/usr/bin/env bash
Davide Pesavento423553e2022-08-19 20:46:06 -04002set -eo pipefail
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -08003
Davide Pesavento16479f32024-02-10 17:10:35 -05004# https://github.com/google/sanitizers/wiki/SanitizerCommonFlags
Davide Pesaventofee7ee32020-04-15 02:45:07 -04005# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -08006ASAN_OPTIONS="color=always"
Davide Pesavento16479f32024-02-10 17:10:35 -05007ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
Davide Pesaventofee7ee32020-04-15 02:45:07 -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 Afanasyev984ca9d2016-12-19 13:09:14 -080013export ASAN_OPTIONS
14
Davide Pesavento423553e2022-08-19 20:46:06 -040015# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesavento4a315b32018-11-24 14:32:19 -050016export BOOST_TEST_BUILD_INFO=1
17export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesaventobdd88c12020-11-26 00:35:08 -050018export BOOST_TEST_DETECT_MEMORY_LEAK=0
19export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesavento4a315b32018-11-24 14:32:19 -050020
Davide Pesavento423553e2022-08-19 20:46:06 -040021set -x
22
23# Prepare environment
24rm -rf ~/.ndn
25
Davide Pesavento4a315b32018-11-24 14:32:19 -050026# Run unit tests
Davide Pesaventobdd88c12020-11-26 00:35:08 -050027./build/unit-tests