Control running with valgrind explicitly

This commit is contained in:
Mike Ellery
2017-06-20 18:05:31 -07:00
committed by Vinnie Falco
parent 65b127d2e6
commit ded950a052
3 changed files with 14 additions and 3 deletions

View File

@ -33,12 +33,13 @@ addons:
matrix:
include:
# gcc coverage (+valgrind,+Autobahn if master or develop)
# gcc coverage
- compiler: gcc
env:
- GCC_VER=5
- VARIANT=coverage
- ADDRESS_MODEL=64
- DO_VALGRIND=false
- BUILD_SYSTEM=cmake
- PATH=$PWD/cmake/bin:$PATH
addons:
@ -56,6 +57,7 @@ matrix:
env:
- GCC_VER=4.8
- VARIANT=release
- DO_VALGRIND=false
- ADDRESS_MODEL=64
addons:
apt:
@ -71,6 +73,7 @@ matrix:
env:
- GCC_VER=6
- VARIANT=release
- DO_VALGRIND=true
- ADDRESS_MODEL=64
- BUILD_SYSTEM=cmake
- PATH=$PWD/cmake/bin:$PATH
@ -90,6 +93,7 @@ matrix:
- GCC_VER=5
- VARIANT=ubasan
- CLANG_VER=3.8
- DO_VALGRIND=false
- ADDRESS_MODEL=64
- UBSAN_OPTIONS='print_stacktrace=1'
- BUILD_SYSTEM=cmake

View File

@ -2,6 +2,7 @@ Version 63:
* Use std::to_string instead of lexical_cast
* Don't use cached Boost
* Control running with valgrind explicitly
--------------------------------------------------------------------------------

View File

@ -9,6 +9,8 @@ shopt -s globstar
################################## ENVIRONMENT #################################
DO_VALGRIND=${DO_VALGRIND:-false}
# If not CI, then set some defaults
if [[ "${CI:-}" == "" ]]; then
TRAVIS_BRANCH=${TRAVIS_BRANCH:-feature}
@ -140,7 +142,7 @@ if [[ $VARIANT == "coverage" ]]; then
lcov --no-external -c -i -d . -o baseline.info > /dev/null
# Perform test
if [[ $MAIN_BRANCH == "1" ]]; then
if [[ $MAIN_BRANCH == "1" && "$DO_VALGRIND" = true ]]; then
run_tests_with_valgrind
# skip slow autobahn tests
#run_autobahn_test_suite
@ -164,5 +166,9 @@ if [[ $VARIANT == "coverage" ]]; then
# Clean up these stragglers so BOOST_ROOT cache is clean
find $BOOST_ROOT/bin.v2 -name "*.gcda" | xargs rm -f
else
run_tests_with_debugger
if [[ $MAIN_BRANCH == "1" && "$DO_VALGRIND" = true ]]; then
run_tests_with_valgrind
else
run_tests_with_debugger
fi
fi