blob: 8e6008930938a925d2d40ed24241fce16ac26e55 [file] [log] [blame]
Alexander Afanasyev6e64ac92018-06-14 17:25:38 -04001#!/usr/bin/env bash
Davide Pesavento27dd70c2022-08-19 16:24:28 -04002set -eo pipefail
Alexander Afanasyev6e64ac92018-06-14 17:25:38 -04003
Davide Pesaventoec61b742020-04-18 01:00:12 -04004# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Alexander Afanasyev6e64ac92018-06-14 17:25:38 -04005ASAN_OPTIONS="color=always"
Davide Pesaventoec61b742020-04-18 01:00:12 -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"
11ASAN_OPTIONS+=":detect_container_overflow=0"
Alexander Afanasyev6e64ac92018-06-14 17:25:38 -040012ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
13export ASAN_OPTIONS
14
Davide Pesavento27dd70c2022-08-19 16:24:28 -040015# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesavento8f9d0622018-11-27 01:23:37 -050016export BOOST_TEST_BUILD_INFO=1
17export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesaventoba3f6892020-12-08 22:18:35 -050018export BOOST_TEST_DETECT_MEMORY_LEAK=0
19export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesavento8f9d0622018-11-27 01:23:37 -050020
Davide Pesavento27dd70c2022-08-19 16:24:28 -040021set -x
22
23# Prepare environment
24rm -rf ~/.ndn
25
Alexander Afanasyev6e64ac92018-06-14 17:25:38 -040026# Run unit tests
Davide Pesaventoba3f6892020-12-08 22:18:35 -050027./build/unit-tests