summaryrefslogtreecommitdiff
path: root/regress/valgrind-unit.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2018-07-13 11:39:25 +1000
committerDamien Miller <djm@mindrot.org>2018-07-13 11:41:33 +1000
commit2f6accff5085eb79b0dbe262d8b85ed017d1a51c (patch)
tree42045dfc3b140e6089dd422dcb38d771376028a0 /regress/valgrind-unit.sh
parente46cfbd9db5e907b821bf4fd0184d4dab99815ee (diff)
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.
Diffstat (limited to 'regress/valgrind-unit.sh')
-rwxr-xr-xregress/valgrind-unit.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/regress/valgrind-unit.sh b/regress/valgrind-unit.sh
index d1c110008..4143ead4b 100755
--- a/regress/valgrind-unit.sh
+++ b/regress/valgrind-unit.sh
@@ -7,11 +7,9 @@ UNIT_ARGS="$@"
7test "x$OBJ" = "x" && OBJ=$PWD 7test "x$OBJ" = "x" && OBJ=$PWD
8 8
9# This mostly replicates the logic in test-exec.sh for running the 9# This mostly replicates the logic in test-exec.sh for running the
10# regress tests under valgrind. 10# regress tests under valgrind, except that we unconditionally enable
11VG_LEAK="--leak-check=no" 11# leak checking because the unit tests should be clean.
12if [ x"$VALGRIND_CHECK_LEAKS" != "x" ]; then 12VG_LEAK="--leak-check=full"
13 VG_LEAK="--leak-check=full"
14fi
15VG_TEST=`basename $UNIT_BINARY` 13VG_TEST=`basename $UNIT_BINARY`
16VG_LOG="$OBJ/valgrind-out/${VG_TEST}.%p" 14VG_LOG="$OBJ/valgrind-out/${VG_TEST}.%p"
17VG_OPTS="--track-origins=yes $VG_LEAK --log-file=${VG_LOG}" 15VG_OPTS="--track-origins=yes $VG_LEAK --log-file=${VG_LOG}"