Alexander Afanasyev | 21034bf | 2014-09-02 18:31:53 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 2 | set -ex |
Alexander Afanasyev | 984ca9d | 2016-12-19 13:09:14 -0800 | [diff] [blame] | 3 | |
Shock Jiang | cde2871 | 2014-10-19 21:17:20 -0700 | [diff] [blame] | 4 | # Prepare environment |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 5 | rm -rf ~/.ndn |
Shock Jiang | cde2871 | 2014-10-19 21:17:20 -0700 | [diff] [blame] | 6 | |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame] | 7 | if has OSX $NODE_LABELS; then |
Alexander Afanasyev | 984ca9d | 2016-12-19 13:09:14 -0800 | [diff] [blame] | 8 | security unlock-keychain -p named-data |
Shock Jiang | cde2871 | 2014-10-19 21:17:20 -0700 | [diff] [blame] | 9 | fi |
| 10 | |
Alexander Afanasyev | 984ca9d | 2016-12-19 13:09:14 -0800 | [diff] [blame] | 11 | ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert - |
| 12 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 13 | # https://github.com/google/sanitizers/wiki/AddressSanitizerFlags |
Alexander Afanasyev | 984ca9d | 2016-12-19 13:09:14 -0800 | [diff] [blame] | 14 | ASAN_OPTIONS="color=always" |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 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" |
Alexander Afanasyev | 984ca9d | 2016-12-19 13:09:14 -0800 | [diff] [blame] | 20 | ASAN_OPTIONS+=":strip_path_prefix=${PWD}/" |
| 21 | export ASAN_OPTIONS |
| 22 | |
Davide Pesavento | 4a315b3 | 2018-11-24 14:32:19 -0500 | [diff] [blame] | 23 | export BOOST_TEST_BUILD_INFO=1 |
| 24 | export BOOST_TEST_COLOR_OUTPUT=1 |
Davide Pesavento | bdd88c1 | 2020-11-26 00:35:08 -0500 | [diff] [blame] | 25 | export BOOST_TEST_DETECT_MEMORY_LEAK=0 |
| 26 | export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml |
Davide Pesavento | 4a315b3 | 2018-11-24 14:32:19 -0500 | [diff] [blame] | 27 | |
| 28 | # Run unit tests |
Davide Pesavento | bdd88c1 | 2020-11-26 00:35:08 -0500 | [diff] [blame] | 29 | ./build/unit-tests |