blob: ea5f998d4324dbb4348143db10061560c764993f [file] [log] [blame]
Ashlesh Gawande0b2897e2018-06-20 14:40:47 -05001#!/usr/bin/env bash
Davide Pesaventoda1a4d32022-08-19 19:03:24 -04002set -eo pipefail
Ashlesh Gawande0b2897e2018-06-20 14:40:47 -05003
Davide Pesavento8d6192a2024-02-09 21:23:50 -05004# https://github.com/google/sanitizers/wiki/SanitizerCommonFlags
Davide Pesavento133067f2020-04-02 22:08:27 -04005# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Ashlesh Gawande0b2897e2018-06-20 14:40:47 -05006ASAN_OPTIONS="color=always"
Davide Pesavento8d6192a2024-02-09 21:23:50 -05007ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
Davide Pesavento133067f2020-04-02 22:08:27 -04008ASAN_OPTIONS+=":check_initialization_order=1"
9ASAN_OPTIONS+=":detect_stack_use_after_return=1"
10ASAN_OPTIONS+=":strict_init_order=1"
11ASAN_OPTIONS+=":strict_string_checks=1"
12ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
Ashlesh Gawande0b2897e2018-06-20 14:40:47 -050013export ASAN_OPTIONS
14
Davide Pesaventoda1a4d32022-08-19 19:03:24 -040015# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesavento1526fee2019-03-18 19:31:55 -040016export BOOST_TEST_BUILD_INFO=1
17export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesavento042dfb32020-07-23 21:07:16 -040018export BOOST_TEST_DETECT_MEMORY_LEAK=0
19export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Ashlesh Gawande0b2897e2018-06-20 14:40:47 -050020
Davide Pesaventoda1a4d32022-08-19 19:03:24 -040021set -x
22
23# Prepare environment
24rm -rf ~/.ndn
25
Ashlesh Gawande0b2897e2018-06-20 14:40:47 -050026# Run unit tests
Davide Pesavento042dfb32020-07-23 21:07:16 -040027./build/unit-tests