Enable leak checks for unit tests with valgrind
Leave the leak checking on unconditionally when running with valgrind. The unit tests are leak-free and I want them to stay that way.
This commit is contained in:
parent
e46cfbd9db
commit
2f6accff50
|
@ -7,11 +7,9 @@ UNIT_ARGS="$@"
|
||||||
test "x$OBJ" = "x" && OBJ=$PWD
|
test "x$OBJ" = "x" && OBJ=$PWD
|
||||||
|
|
||||||
# This mostly replicates the logic in test-exec.sh for running the
|
# This mostly replicates the logic in test-exec.sh for running the
|
||||||
# regress tests under valgrind.
|
# regress tests under valgrind, except that we unconditionally enable
|
||||||
VG_LEAK="--leak-check=no"
|
# leak checking because the unit tests should be clean.
|
||||||
if [ x"$VALGRIND_CHECK_LEAKS" != "x" ]; then
|
VG_LEAK="--leak-check=full"
|
||||||
VG_LEAK="--leak-check=full"
|
|
||||||
fi
|
|
||||||
VG_TEST=`basename $UNIT_BINARY`
|
VG_TEST=`basename $UNIT_BINARY`
|
||||||
VG_LOG="$OBJ/valgrind-out/${VG_TEST}.%p"
|
VG_LOG="$OBJ/valgrind-out/${VG_TEST}.%p"
|
||||||
VG_OPTS="--track-origins=yes $VG_LEAK --log-file=${VG_LOG}"
|
VG_OPTS="--track-origins=yes $VG_LEAK --log-file=${VG_LOG}"
|
||||||
|
|
Loading…
Reference in New Issue