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.
This commit is contained in:
Дмитрий Левин 2017-07-22 18:46:16 +00:00
parent d6a94e0bcd
commit 725e0fdd1d
2 changed files with 20 additions and 0 deletions

View File

@ -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-}
;;

View File

@ -67,4 +67,7 @@ case "${CHECK-}" in
apt_get_install lcov
pip install --user codecov
;;
valgrind)
apt_get_install valgrind
;;
esac