summaryrefslogtreecommitdiff
path: root/cpp/tests/setup
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/tests/setup')
-rw-r--r--cpp/tests/setup7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/tests/setup b/cpp/tests/setup
index a50aa8a5cc..febf613847 100644
--- a/cpp/tests/setup
+++ b/cpp/tests/setup
@@ -3,6 +3,8 @@
test "$VERBOSE" = yes && set -x
pwd=`pwd`
+test -z "$abs_srcdir" && abs_srcdir=$pwd
+
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
pid=0
test -z "$TEST_DEBUG" &&
@@ -31,9 +33,12 @@ vg_options="
if test x$VALGRIND = x; then
vg=
else
- vg="libtool --mode=execute valgrind `echo $vg_options` --"
+ vg="libtool --mode=execute $VALGRIND `echo $vg_options` --"
+ # Suppress dlclose or valgrind traces wont have test library symbols.
+ vg="env LD_PRELOAD=$pwd/.libs/libdlclose_noop.so $vg"
fi
+
vg_leak_check()
{
local file=$1