blob: 0a87281233decba2f071b1469e961a851a1c69f7 [file] [log] [blame]
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -07001#!/usr/bin/env bash
Davide Pesaventoede59632022-08-26 20:35:44 -04002set -eo pipefail
Davide Pesavento813df802017-08-20 20:53:54 -04003
Davide Pesavento543f2b62024-02-10 16:22:24 -05004# https://github.com/google/sanitizers/wiki/SanitizerCommonFlags
Davide Pesaventof6be8e32020-04-30 16:06:03 -04005# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Davide Pesaventoc58cc7f2017-08-08 16:51:28 -05006ASAN_OPTIONS="color=always"
Davide Pesavento543f2b62024-02-10 16:22:24 -05007ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
Davide Pesaventof6be8e32020-04-30 16:06:03 -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"
13ASAN_OPTIONS+=":detect_container_overflow=0"
Davide Pesaventoc58cc7f2017-08-08 16:51:28 -050014export ASAN_OPTIONS
15
Davide Pesaventoede59632022-08-26 20:35:44 -040016# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040017export BOOST_TEST_BUILD_INFO=1
18export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesavento7ae8b082021-10-12 21:45:47 -040019export BOOST_TEST_DETECT_MEMORY_LEAK=0
20export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040021
Davide Pesaventoede59632022-08-26 20:35:44 -040022set -x
23
24# Prepare environment
25rm -rf ~/.ndn
26
Davide Pesavento813df802017-08-20 20:53:54 -040027# Run unit tests
Davide Pesavento7ae8b082021-10-12 21:45:47 -040028./build/unit-tests-nlsr