Add a new environment variable, TESTWRAPPER, which allows the tests
to be run easily in tools like valgrind or qemu.
: "${LBXTOOL=$builddir/lbxtool$EXEEXT}"
: "${LBXIMG=$builddir/lbximg$EXEEXT}"
-# Set MALLOC_CHECK_ in the environment of the test programs which will enable
-# malloc instrumentation on glibc-based systems to hopefully catch some forms
-# of memory corruption.
-dx_test_wrapper="$builddir/libtool --mode=execute env MALLOC_CHECK_=3"
+dx_test_wrapper="$builddir/libtool --mode=execute${TESTWRAPPER:+ }$TESTWRAPPER"
LBXTOOL="$dx_test_wrapper $LBXTOOL"
LBXIMG="$dx_test_wrapper $LBXIMG"