blob: ea5f998d4324dbb4348143db10061560c764993f [file] [log] [blame]
Zhiyi Zhang8617a792017-01-17 16:45:56 -08001#!/usr/bin/env bash
Davide Pesavento6d1b6722022-08-20 17:54:05 -04002set -eo pipefail
Zhiyi Zhang8617a792017-01-17 16:45:56 -08003
Davide Pesavento526d4c82024-02-09 18:56:05 -05004# https://github.com/google/sanitizers/wiki/SanitizerCommonFlags
Davide Pesavento552174c2020-04-16 01:54:08 -04005# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Zhiyi Zhang8617a792017-01-17 16:45:56 -08006ASAN_OPTIONS="color=always"
Davide Pesavento526d4c82024-02-09 18:56:05 -05007ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
Davide Pesavento552174c2020-04-16 01:54:08 -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"
Zhiyi Zhang8617a792017-01-17 16:45:56 -080013export ASAN_OPTIONS
14
Davide Pesavento6d1b6722022-08-20 17:54:05 -040015# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesavento759d47a2019-03-18 18:58:52 -040016export BOOST_TEST_BUILD_INFO=1
17export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesavento725d3fc2021-11-19 23:37:03 -050018export BOOST_TEST_DETECT_MEMORY_LEAK=0
19export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesavento759d47a2019-03-18 18:58:52 -040020
Davide Pesavento6d1b6722022-08-20 17:54:05 -040021set -x
22
23# Prepare environment
24rm -rf ~/.ndn
25
Davide Pesaventocf9ffe42018-01-21 22:21:53 -050026# Run unit tests
Davide Pesavento725d3fc2021-11-19 23:37:03 -050027./build/unit-tests