Fix memory leak and enable valgrind on travis

This commit is contained in:
Thiago de Arruda
2014-03-06 22:04:07 -03:00
parent 1b5c3331dc
commit cab5c25c70
4 changed files with 10 additions and 6 deletions

View File

@@ -1,11 +1,11 @@
#!/bin/sh -e
# export VALGRIND_CHECK=1
export VALGRIND_CHECK=1
make cmake CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$PWD/dist"
make
make unittest
echo "Running tests with valgrind..."
if ! make test > /dev/null; then
if ! make test; then
if ls src/testdir/valgrind.* > /dev/null 2>&1; then
echo "Memory leak detected" >&2
cat src/testdir/valgrind.*