Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Davide Pesavento | ede5963 | 2022-08-26 20:35:44 -0400 | [diff] [blame] | 2 | set -eo pipefail |
Davide Pesavento | 813df80 | 2017-08-20 20:53:54 -0400 | [diff] [blame] | 3 | |
Davide Pesavento | 543f2b6 | 2024-02-10 16:22:24 -0500 | [diff] [blame] | 4 | # https://github.com/google/sanitizers/wiki/SanitizerCommonFlags |
Davide Pesavento | f6be8e3 | 2020-04-30 16:06:03 -0400 | [diff] [blame] | 5 | # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags |
Davide Pesavento | c58cc7f | 2017-08-08 16:51:28 -0500 | [diff] [blame] | 6 | ASAN_OPTIONS="color=always" |
Davide Pesavento | 543f2b6 | 2024-02-10 16:22:24 -0500 | [diff] [blame] | 7 | ASAN_OPTIONS+=":strip_path_prefix=${PWD}/" |
Davide Pesavento | f6be8e3 | 2020-04-30 16:06:03 -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" |
| 13 | ASAN_OPTIONS+=":detect_container_overflow=0" |
Davide Pesavento | c58cc7f | 2017-08-08 16:51:28 -0500 | [diff] [blame] | 14 | export ASAN_OPTIONS |
| 15 | |
Davide Pesavento | ede5963 | 2022-08-26 20:35:44 -0400 | [diff] [blame] | 16 | # https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html |
Davide Pesavento | 0b0eddd | 2019-03-19 14:42:15 -0400 | [diff] [blame] | 17 | export BOOST_TEST_BUILD_INFO=1 |
| 18 | export BOOST_TEST_COLOR_OUTPUT=1 |
Davide Pesavento | 7ae8b08 | 2021-10-12 21:45:47 -0400 | [diff] [blame] | 19 | export BOOST_TEST_DETECT_MEMORY_LEAK=0 |
| 20 | export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml |
Davide Pesavento | 0b0eddd | 2019-03-19 14:42:15 -0400 | [diff] [blame] | 21 | |
Davide Pesavento | ede5963 | 2022-08-26 20:35:44 -0400 | [diff] [blame] | 22 | set -x |
| 23 | |
| 24 | # Prepare environment |
| 25 | rm -rf ~/.ndn |
| 26 | |
Davide Pesavento | 813df80 | 2017-08-20 20:53:54 -0400 | [diff] [blame] | 27 | # Run unit tests |
Davide Pesavento | 7ae8b08 | 2021-10-12 21:45:47 -0400 | [diff] [blame] | 28 | ./build/unit-tests-nlsr |