Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Davide Pesavento | bd3642f | 2022-08-12 18:19:31 -0400 | [diff] [blame] | 2 | set -eo pipefail |
Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 3 | |
Davide Pesavento | 1df2cff | 2024-02-09 19:40:03 -0500 | [diff] [blame] | 4 | # https://github.com/google/sanitizers/wiki/SanitizerCommonFlags |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -0400 | [diff] [blame] | 5 | # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags |
Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 6 | ASAN_OPTIONS="color=always" |
Davide Pesavento | 1df2cff | 2024-02-09 19:40:03 -0500 | [diff] [blame] | 7 | ASAN_OPTIONS+=":strip_path_prefix=${PWD}/" |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -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" |
Davide Pesavento | d839882 | 2020-03-29 18:46:19 -0400 | [diff] [blame] | 12 | ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2" |
Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 13 | export ASAN_OPTIONS |
| 14 | |
Davide Pesavento | bd3642f | 2022-08-12 18:19:31 -0400 | [diff] [blame] | 15 | # https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html |
Davide Pesavento | 3f2f486 | 2018-09-11 17:56:55 -0400 | [diff] [blame] | 16 | export BOOST_TEST_BUILD_INFO=1 |
| 17 | export BOOST_TEST_COLOR_OUTPUT=1 |
Davide Pesavento | b07d7a9 | 2020-05-13 23:30:07 -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 | 3f2f486 | 2018-09-11 17:56:55 -0400 | [diff] [blame] | 20 | |
Davide Pesavento | bd3642f | 2022-08-12 18:19:31 -0400 | [diff] [blame] | 21 | set -x |
| 22 | |
| 23 | # Prepare environment |
| 24 | rm -rf ~/.ndn |
| 25 | |
Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 26 | # Run unit tests |
Davide Pesavento | b07d7a9 | 2020-05-13 23:30:07 -0400 | [diff] [blame] | 27 | ./build/unit-tests |