Add valgrind to TravisCI testing

This commit is contained in:
Matt Stancliff 2015-01-22 15:31:43 -05:00
parent 3c023ee157
commit dd680fcc14
2 changed files with 9 additions and 2 deletions

View File

@ -3,4 +3,11 @@ compiler:
- gcc
- clang
script: make && make check
env:
- PRE=""
- PRE="valgrind --track-origins=yes --leak-check=full"
install:
- sudo apt-get install libc6-dbg libc6-dev libc6-i686:i386 libc6-dev-i386 libc6-dbg:i386 valgrind -y
script: make && make check PRE="$PRE"

View File

@ -128,7 +128,7 @@ test: hiredis-test
check: hiredis-test
@echo "$$REDIS_TEST_CONFIG" | $(REDIS_SERVER) -
./hiredis-test -h 127.0.0.1 -p $(REDIS_PORT) -s /tmp/hiredis-test-redis.sock || \
$(PRE) ./hiredis-test -h 127.0.0.1 -p $(REDIS_PORT) -s /tmp/hiredis-test-redis.sock || \
( kill `cat /tmp/hiredis-test-redis.pid` && false )
kill `cat /tmp/hiredis-test-redis.pid`