From 75441a180d4935917f0072059de5ddf8d3a298fd Mon Sep 17 00:00:00 2001 From: Philipp Moritz Date: Wed, 5 Oct 2016 16:09:40 -0700 Subject: [PATCH] add valgrind tests (#33) * add valgrind * install valgrind --- .travis.yml | 9 +++++++++ Makefile | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index 174fee43f..d0e14edf5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,15 @@ matrix: install: [] script: - .travis/check-git-clang-format-output.sh + - os: linux + dist: trusty + python: "2.7" + env: VALGRIND=1 + before_install: + - sudo apt-get update -qq + - sudo apt-get install -qq valgrind + script: + - make valgrind install: - ./install-dependencies.sh diff --git a/Makefile b/Makefile index ad955de98..dae76e87b 100644 --- a/Makefile +++ b/Makefile @@ -36,4 +36,11 @@ test: hiredis redis $(BUILD)/common_tests $(BUILD)/db_tests $(BUILD)/io_tests $( ./thirdparty/redis-3.2.3/src/redis-server & sleep 1s ; ./build/common_tests ; ./build/db_tests ; ./build/io_tests ; ./build/task_tests ; ./build/redis_tests +valgrind: test + valgrind --leak-check=full --error-exitcode=1 ./build/common_tests + valgrind --leak-check=full --error-exitcode=1 ./build/db_tests + valgrind --leak-check=full --error-exitcode=1 ./build/io_tests + valgrind --leak-check=full --error-exitcode=1 ./build/task_tests + valgrind --leak-check=full --error-exitcode=1 ./build/redis_tests + FORCE: