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: