Varun Patil | a24bd3e | 2020-11-24 10:08:33 +0530 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -ex |
| 3 | |
| 4 | # Prepare environment |
| 5 | rm -rf ~/.ndn |
| 6 | |
| 7 | if has OSX $NODE_LABELS; then |
| 8 | security unlock-keychain -p named-data |
| 9 | fi |
| 10 | |
| 11 | ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert - |
| 12 | |
| 13 | # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags |
| 14 | ASAN_OPTIONS="color=always" |
| 15 | ASAN_OPTIONS+=":check_initialization_order=1" |
| 16 | ASAN_OPTIONS+=":detect_stack_use_after_return=1" |
| 17 | ASAN_OPTIONS+=":strict_init_order=1" |
| 18 | ASAN_OPTIONS+=":strict_string_checks=1" |
| 19 | ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2" |
| 20 | ASAN_OPTIONS+=":detect_container_overflow=0" |
| 21 | ASAN_OPTIONS+=":detect_leaks=0" |
| 22 | ASAN_OPTIONS+=":strip_path_prefix=${PWD}/" |
| 23 | export ASAN_OPTIONS |
| 24 | |
| 25 | export BOOST_TEST_BUILD_INFO=1 |
| 26 | export BOOST_TEST_COLOR_OUTPUT=1 |
| 27 | export BOOST_TEST_DETECT_MEMORY_LEAK=0 |
| 28 | export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml |
| 29 | |
| 30 | # Run unit tests |
| 31 | ./build/unit-tests |