summaryrefslogtreecommitdiff
path: root/test/run-stp-tests.sh
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2018-12-04 09:36:02 -0500
committerMichael R Sweet <michael.r.sweet@gmail.com>2018-12-04 09:36:02 -0500
commitf518bf7ea19de7d9ddc79ffe2d4d0556145adbec (patch)
tree24fd15edbdb06b07a658145ea85e56b5a7f1b151 /test/run-stp-tests.sh
parent3043e3a53380f49a85485470f4520a39366ee07f (diff)
downloadcups-f518bf7ea19de7d9ddc79ffe2d4d0556145adbec.tar.gz
Support AddressSanitizer in builds.
Fix a compiler warning on macOS.
Diffstat (limited to 'test/run-stp-tests.sh')
-rwxr-xr-xtest/run-stp-tests.sh20
1 files changed, 9 insertions, 11 deletions
diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
index ac5ea76c4..42395dd7e 100755
--- a/test/run-stp-tests.sh
+++ b/test/run-stp-tests.sh
@@ -569,6 +569,14 @@ fi
echo "Setting up environment variables for test..."
+if test "x$ASAN_OPTIONS" = x; then
+ # AddressSanitizer on Linux reports memory leaks from the main function
+ # which is basically useless - in general, programs do not need to free
+ # every object before exit since the OS will recover the process's
+ # memory.
+ ASAN_OPTIONS="suppressions=$root/test/asan-suppressions.txt"
+fi
+
if test "x$LD_LIBRARY_PATH" = x; then
LD_LIBRARY_PATH="$root/cups"
else
@@ -657,17 +665,7 @@ echo "Starting scheduler:"
echo " $runcups $VALGRIND ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_log 2>&1 &"
echo ""
-if test `uname` = Darwin -a "x$VALGRIND" = x; then
- if test "x$DYLD_INSERT_LIBRARIES" = x; then
- insert="/usr/lib/libgmalloc.dylib"
- else
- insert="/usr/lib/libgmalloc.dylib:$DYLD_INSERT_LIBRARIES"
- fi
-
- DYLD_INSERT_LIBRARIES="$insert" MallocStackLogging=1 $runcups ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_log 2>&1 &
-else
- $runcups $VALGRIND ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_log 2>&1 &
-fi
+$runcups $VALGRIND ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_log 2>&1 &
cupsd=$!