blob: 81c00b1513073be645b91ac5720ee19949c35499 [file] [log] [blame]
Davide Pesavento956ac312016-09-20 19:11:30 +02001#!/usr/bin/env bash
Davide Pesaventod8398822020-03-29 18:46:19 -04002set -ex
Davide Pesavento956ac312016-09-20 19:11:30 +02003
4# Prepare environment
Davide Pesaventoa1a9d702020-03-29 00:58:15 -04005rm -rf ~/.ndn
Davide Pesavento956ac312016-09-20 19:11:30 +02006
Davide Pesaventoa1a9d702020-03-29 00:58:15 -04007# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
Davide Pesavento956ac312016-09-20 19:11:30 +02008ASAN_OPTIONS="color=always"
Davide Pesaventoa1a9d702020-03-29 00:58:15 -04009ASAN_OPTIONS+=":check_initialization_order=1"
10ASAN_OPTIONS+=":detect_stack_use_after_return=1"
11ASAN_OPTIONS+=":strict_init_order=1"
12ASAN_OPTIONS+=":strict_string_checks=1"
Davide Pesaventod8398822020-03-29 18:46:19 -040013ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
Davide Pesavento956ac312016-09-20 19:11:30 +020014ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
15export ASAN_OPTIONS
16
Davide Pesavento3f2f4862018-09-11 17:56:55 -040017export BOOST_TEST_BUILD_INFO=1
18export BOOST_TEST_COLOR_OUTPUT=1
Davide Pesaventob07d7a92020-05-13 23:30:07 -040019export BOOST_TEST_DETECT_MEMORY_LEAK=0
20export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
Davide Pesavento3f2f4862018-09-11 17:56:55 -040021
Davide Pesavento956ac312016-09-20 19:11:30 +020022# Run unit tests
Davide Pesaventob07d7a92020-05-13 23:30:07 -040023./build/unit-tests