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

View File

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

View File

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