blob: ab1428488ca72085d716d46d972639f9152b419b [file] [log] [blame]
Alexander Afanasyev21034bf2014-09-02 18:31:53 -07001#!/usr/bin/env bash
Davide Pesavento423553e2022-08-19 20:46:06 -04002set -eo pipefail
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -08003
Davide Pesaventofee7ee32020-04-15 02:45:07 -04004# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -08005ASAN_OPTIONS="color=always"
Davide Pesaventofee7ee32020-04-15 02:45:07 -04006ASAN_OPTIONS+=":check_initialization_order=1"
7ASAN_OPTIONS+=":detect_stack_use_after_return=1"
8ASAN_OPTIONS+=":strict_init_order=1"
9ASAN_OPTIONS+=":strict_string_checks=1"
10ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -080011ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
12export ASAN_OPTIONS
13
Davide Pesavento423553e2022-08-19 20:46:06 -040014# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesavento4a315b32018-11-24 14:32:19 -050015export BOOST_TEST_BUILD_INFO=1
16export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesaventobdd88c12020-11-26 00:35:08 -050017export BOOST_TEST_DETECT_MEMORY_LEAK=0
18export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesavento4a315b32018-11-24 14:32:19 -050019
Davide Pesavento423553e2022-08-19 20:46:06 -040020set -x
21
22# Prepare environment
23rm -rf ~/.ndn
24
Davide Pesavento4a315b32018-11-24 14:32:19 -050025# Run unit tests
Davide Pesaventobdd88c12020-11-26 00:35:08 -050026./build/unit-tests