From 725e0fdd1deb3b6ea35212b228a285a35483a27f Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 22 Jul 2017 18:46:16 +0000 Subject: [PATCH] travis: add valgrind check support * travis-build.sh [CHECK == valgrind]: Pass --enable-valgrind to configure and appropriate check-valgrind-* to make. * travis-install.sh [CHECK == valgrind]: Install valgrind. --- travis-build.sh | 17 +++++++++++++++++ travis-install.sh | 3 +++ 2 files changed, 20 insertions(+) diff --git a/travis-build.sh b/travis-build.sh index e4b5b29d..2c058146 100755 --- a/travis-build.sh +++ b/travis-build.sh @@ -38,6 +38,9 @@ case "${CHECK-}" in CFLAGS_FOR_BUILD="$CFLAGS" export CFLAGS CFLAGS_FOR_BUILD ;; + valgrind) + DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --enable-valgrind" + ;; esac echo 'BEGIN OF BUILD ENVIRONMENT INFORMATION' @@ -72,6 +75,20 @@ case "${CHECK-}" in tail -n 99999 -- tests*/test-suite.log tests*/ksysent.log echo 'END OF TEST SUITE INFORMATION' ;; + valgrind) + make -k $j all VERBOSE=${VERBOSE-} + rc=$? + for n in ${VALGRIND_TOOLS:-memcheck helgrind drd}; do + make -k $j -C "${VALGRIND_TESTDIR:-.}" \ + check-valgrind-$n VERBOSE=${VERBOSE-} || + rc=$? + done + echo 'BEGIN OF TEST SUITE INFORMATION' + tail -n 99999 -- tests*/test-suite*.log tests*/ksysent.log || + rc=$? + echo 'END OF TEST SUITE INFORMATION' + [ "$rc" -eq 0 ] + ;; *) make -k $j distcheck VERBOSE=${VERBOSE-} ;; diff --git a/travis-install.sh b/travis-install.sh index 6334f7c6..3aaa7885 100755 --- a/travis-install.sh +++ b/travis-install.sh @@ -67,4 +67,7 @@ case "${CHECK-}" in apt_get_install lcov pip install --user codecov ;; + valgrind) + apt_get_install valgrind + ;; esac