From 9e7e4ab6617fef1d1681fc2d3e02554264ccc954 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 13:13:18 +0200 Subject: Adding upstream version 1:8.4p1. Signed-off-by: Daniel Baumann --- regress/valgrind-unit.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 regress/valgrind-unit.sh (limited to 'regress/valgrind-unit.sh') diff --git a/regress/valgrind-unit.sh b/regress/valgrind-unit.sh new file mode 100755 index 0000000..4143ead --- /dev/null +++ b/regress/valgrind-unit.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +UNIT_BINARY="$1" +shift +UNIT_ARGS="$@" + +test "x$OBJ" = "x" && OBJ=$PWD + +# This mostly replicates the logic in test-exec.sh for running the +# regress tests under valgrind, except that we unconditionally enable +# leak checking because the unit tests should be clean. +VG_LEAK="--leak-check=full" +VG_TEST=`basename $UNIT_BINARY` +VG_LOG="$OBJ/valgrind-out/${VG_TEST}.%p" +VG_OPTS="--track-origins=yes $VG_LEAK --log-file=${VG_LOG}" +VG_OPTS="$VG_OPTS --trace-children=yes" +VG_PATH="valgrind" +if [ "x$VALGRIND_PATH" != "x" ]; then + VG_PATH="$VALGRIND_PATH" +fi + +exec $VG_PATH $VG_OPTS $UNIT_BINARY $UNIT_ARGS -- cgit v1.2.3