Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Davide Pesavento | 6d1b672 | 2022-08-20 17:54:05 -0400 | [diff] [blame] | 2 | set -eo pipefail |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 3 | |
Davide Pesavento | 526d4c8 | 2024-02-09 18:56:05 -0500 | [diff] [blame^] | 4 | # https://github.com/google/sanitizers/wiki/SanitizerCommonFlags |
Davide Pesavento | 552174c | 2020-04-16 01:54:08 -0400 | [diff] [blame] | 5 | # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 6 | ASAN_OPTIONS="color=always" |
Davide Pesavento | 526d4c8 | 2024-02-09 18:56:05 -0500 | [diff] [blame^] | 7 | ASAN_OPTIONS+=":strip_path_prefix=${PWD}/" |
Davide Pesavento | 552174c | 2020-04-16 01:54:08 -0400 | [diff] [blame] | 8 | ASAN_OPTIONS+=":check_initialization_order=1" |
| 9 | ASAN_OPTIONS+=":detect_stack_use_after_return=1" |
| 10 | ASAN_OPTIONS+=":strict_init_order=1" |
| 11 | ASAN_OPTIONS+=":strict_string_checks=1" |
| 12 | ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2" |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 13 | export ASAN_OPTIONS |
| 14 | |
Davide Pesavento | 6d1b672 | 2022-08-20 17:54:05 -0400 | [diff] [blame] | 15 | # https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html |
Davide Pesavento | 759d47a | 2019-03-18 18:58:52 -0400 | [diff] [blame] | 16 | export BOOST_TEST_BUILD_INFO=1 |
| 17 | export BOOST_TEST_COLOR_OUTPUT=1 |
Davide Pesavento | 725d3fc | 2021-11-19 23:37:03 -0500 | [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 | 759d47a | 2019-03-18 18:58:52 -0400 | [diff] [blame] | 20 | |
Davide Pesavento | 6d1b672 | 2022-08-20 17:54:05 -0400 | [diff] [blame] | 21 | set -x |
| 22 | |
| 23 | # Prepare environment |
| 24 | rm -rf ~/.ndn |
| 25 | |
Davide Pesavento | cf9ffe4 | 2018-01-21 22:21:53 -0500 | [diff] [blame] | 26 | # Run unit tests |
Davide Pesavento | 725d3fc | 2021-11-19 23:37:03 -0500 | [diff] [blame] | 27 | ./build/unit-tests |