blob: ea5f998d4324dbb4348143db10061560c764993f [file] [log] [blame]
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04001#!/usr/bin/env bash
Davide Pesavento73e946e2022-08-06 16:44:54 -04002set -eo pipefail
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04003
Davide Pesavento5d36a522024-02-09 01:36:52 -05004# https://github.com/google/sanitizers/wiki/SanitizerCommonFlags
Davide Pesavento2349e282020-03-24 14:28:03 -04005# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Davide Pesavento50e20022016-09-17 18:50:27 +02006ASAN_OPTIONS="color=always"
Davide Pesavento5d36a522024-02-09 01:36:52 -05007ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
Davide Pesavento2349e282020-03-24 14:28:03 -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"
Davide Pesavento50e20022016-09-17 18:50:27 +020013export ASAN_OPTIONS
14
Davide Pesavento73e946e2022-08-06 16:44:54 -040015# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesaventocdb5d8f2018-09-05 22:27:49 -040016export BOOST_TEST_BUILD_INFO=1
17export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesavento78338c52020-04-20 23:00:02 -040018export BOOST_TEST_DETECT_MEMORY_LEAK=0
19export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesaventocdb5d8f2018-09-05 22:27:49 -040020
Davide Pesavento73e946e2022-08-06 16:44:54 -040021set -x
22
23# Prepare environment
24rm -rf ~/.ndn
25
Alexander Afanasyev667370f2016-08-24 11:54:53 -070026# Run unit tests
Davide Pesavento78338c52020-04-20 23:00:02 -040027./build/unit-tests