blob: ea5f998d4324dbb4348143db10061560c764993f [file] [log] [blame]
Davide Pesavento956ac312016-09-20 19:11:30 +02001#!/usr/bin/env bash
Davide Pesaventobd3642f2022-08-12 18:19:31 -04002set -eo pipefail
Davide Pesavento956ac312016-09-20 19:11:30 +02003
Davide Pesavento1df2cff2024-02-09 19:40:03 -05004# https://github.com/google/sanitizers/wiki/SanitizerCommonFlags
Davide Pesaventoa1a9d702020-03-29 00:58:15 -04005# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Davide Pesavento956ac312016-09-20 19:11:30 +02006ASAN_OPTIONS="color=always"
Davide Pesavento1df2cff2024-02-09 19:40:03 -05007ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
Davide Pesaventoa1a9d702020-03-29 00:58:15 -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"
Davide Pesaventod8398822020-03-29 18:46:19 -040012ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
Davide Pesavento956ac312016-09-20 19:11:30 +020013export ASAN_OPTIONS
14
Davide Pesaventobd3642f2022-08-12 18:19:31 -040015# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesavento3f2f4862018-09-11 17:56:55 -040016export BOOST_TEST_BUILD_INFO=1
17export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesaventob07d7a92020-05-13 23:30:07 -040018export BOOST_TEST_DETECT_MEMORY_LEAK=0
19export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesavento3f2f4862018-09-11 17:56:55 -040020
Davide Pesaventobd3642f2022-08-12 18:19:31 -040021set -x
22
23# Prepare environment
24rm -rf ~/.ndn
25
Davide Pesavento956ac312016-09-20 19:11:30 +020026# Run unit tests
Davide Pesaventob07d7a92020-05-13 23:30:07 -040027./build/unit-tests