]> git.draconx.ca Git - liblbx.git/commitdiff
tests: Allow custom test command wrappers
authorNick Bowler <nbowler@draconx.ca>
Sat, 25 Jan 2014 19:10:33 +0000 (14:10 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sat, 25 Jan 2014 20:32:43 +0000 (15:32 -0500)
Add a new environment variable, TESTWRAPPER, which allows the tests
to be run easily in tools like valgrind or qemu.

tests/util/test-init.sh

index 2c72bf3a2f195b647340bbe8813e482f400c22cb..1754f6a3b4a77ba7d0a6a9d0cd567f7a7ab48633 100644 (file)
@@ -172,9 +172,6 @@ dx_check_pam_md5() {
 : "${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"