blob: ab1428488ca72085d716d46d972639f9152b419b [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 Pesaventoa1a9d702020-03-29 00:58:15 -04004# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Davide Pesavento956ac312016-09-20 19:11:30 +02005ASAN_OPTIONS="color=always"
Davide Pesaventoa1a9d702020-03-29 00:58:15 -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"
Davide Pesaventod8398822020-03-29 18:46:19 -040010ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
Davide Pesavento956ac312016-09-20 19:11:30 +020011ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
12export ASAN_OPTIONS
13
Davide Pesaventobd3642f2022-08-12 18:19:31 -040014# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
Davide Pesavento3f2f4862018-09-11 17:56:55 -040015export BOOST_TEST_BUILD_INFO=1
16export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesaventob07d7a92020-05-13 23:30:07 -040017export BOOST_TEST_DETECT_MEMORY_LEAK=0
18export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesavento3f2f4862018-09-11 17:56:55 -040019
Davide Pesaventobd3642f2022-08-12 18:19:31 -040020set -x
21
22# Prepare environment
23rm -rf ~/.ndn
24
Davide Pesavento956ac312016-09-20 19:11:30 +020025# Run unit tests
Davide Pesaventob07d7a92020-05-13 23:30:07 -040026./build/unit-tests