Alexander Afanasyev | f34a355 | 2017-08-13 21:17:05 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Davide Pesavento | 1d48453 | 2022-08-19 22:08:31 -0400 | [diff] [blame] | 2 | set -eo pipefail |
Alexander Afanasyev | f34a355 | 2017-08-13 21:17:05 -0400 | [diff] [blame] | 3 | |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 4 | # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags |
Alexander Afanasyev | f34a355 | 2017-08-13 21:17:05 -0400 | [diff] [blame] | 5 | ASAN_OPTIONS="color=always" |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 6 | ASAN_OPTIONS+=":check_initialization_order=1" |
| 7 | ASAN_OPTIONS+=":detect_stack_use_after_return=1" |
| 8 | ASAN_OPTIONS+=":strict_init_order=1" |
| 9 | ASAN_OPTIONS+=":strict_string_checks=1" |
| 10 | ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2" |
| 11 | ASAN_OPTIONS+=":detect_container_overflow=0" |
Alexander Afanasyev | f34a355 | 2017-08-13 21:17:05 -0400 | [diff] [blame] | 12 | ASAN_OPTIONS+=":strip_path_prefix=${PWD}/" |
| 13 | export ASAN_OPTIONS |
| 14 | |
Davide Pesavento | 1d48453 | 2022-08-19 22:08:31 -0400 | [diff] [blame] | 15 | # https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html |
Davide Pesavento | 4b76cb4 | 2019-03-18 18:46:09 -0400 | [diff] [blame] | 16 | export BOOST_TEST_BUILD_INFO=1 |
| 17 | export BOOST_TEST_COLOR_OUTPUT=1 |
Davide Pesavento | 6df6880 | 2021-06-04 14:01:36 -0400 | [diff] [blame] | 18 | export BOOST_TEST_DETECT_MEMORY_LEAK=0 |
| 19 | export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml |
Davide Pesavento | 4b76cb4 | 2019-03-18 18:46:09 -0400 | [diff] [blame] | 20 | |
Davide Pesavento | 1d48453 | 2022-08-19 22:08:31 -0400 | [diff] [blame] | 21 | set -x |
| 22 | |
| 23 | # Prepare environment |
| 24 | rm -rf ~/.ndn |
| 25 | |
Davide Pesavento | 4b76cb4 | 2019-03-18 18:46:09 -0400 | [diff] [blame] | 26 | # Run unit tests |
Davide Pesavento | 6df6880 | 2021-06-04 14:01:36 -0400 | [diff] [blame] | 27 | ./build/unit-tests |