]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix ASAN support on Linux, drop suppressions file and just disable leak tests.
authorMichael R Sweet <michaelrsweet@gmail.com>
Tue, 4 Dec 2018 21:52:56 +0000 (16:52 -0500)
committerMichael R Sweet <michaelrsweet@gmail.com>
Tue, 4 Dec 2018 21:52:56 +0000 (16:52 -0500)
ASAN on Linux also requires us to build with --disable-shared.  Which means the
test script should not try to preload the .so files...

test/asan-suppressions.txt [deleted file]
test/run-stp-tests.sh

diff --git a/test/asan-suppressions.txt b/test/asan-suppressions.txt
deleted file mode 100644 (file)
index e216654..0000000
+++ /dev/null
@@ -1 +0,0 @@
-leak:main
index dc4d3bff59e938ec189ec3d60a2ea47d6221b531..56e3d85f3c20af914980a59695cacf5435bff2ba 100755 (executable)
@@ -575,32 +575,35 @@ if test "x$ASAN_OPTIONS" = x; then
        # 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"
+       ASAN_OPTIONS="detect_leaks=false"
+       export ASAN_OPTIONS
 fi
 
-if test "x$LD_LIBRARY_PATH" = x; then
-       LD_LIBRARY_PATH="$root/cups"
-else
-       LD_LIBRARY_PATH="$root/cups:$LD_LIBRARY_PATH"
-fi
+if test -f "$root/cups/libcups.so.2"; then
+        if test "x$LD_LIBRARY_PATH" = x; then
+               LD_LIBRARY_PATH="$root/cups"
+        else
+               LD_LIBRARY_PATH="$root/cups:$LD_LIBRARY_PATH"
+        fi
 
-LD_PRELOAD="$root/cups/libcups.so.2:$root/cups/libcupsimage.so.2"
-if test `uname` = SunOS -a -r /usr/lib/libCrun.so.1; then
-       LD_PRELOAD="/usr/lib/libCrun.so.1:$LD_PRELOAD"
+        LD_PRELOAD="$root/cups/libcups.so.2:$root/cups/libcupsimage.so.2"
+        if test `uname` = SunOS -a -r /usr/lib/libCrun.so.1; then
+               LD_PRELOAD="/usr/lib/libCrun.so.1:$LD_PRELOAD"
+        fi
 fi
 
-if test -f $root/cups/libcups.2.dylib; then
+if test -f "$root/cups/libcups.2.dylib"; then
         if test "x$DYLD_INSERT_LIBRARIES" = x; then
                 DYLD_INSERT_LIBRARIES="$root/cups/libcups.2.dylib:$root/cups/libcupsimage.2.dylib"
         else
                 DYLD_INSERT_LIBRARIES="$root/cups/libcups.2.dylib:$root/cups/libcupsimage.2.dylib:$DYLD_INSERT_LIBRARIES"
         fi
-fi
 
-if test "x$DYLD_LIBRARY_PATH" = x; then
-       DYLD_LIBRARY_PATH="$root/cups"
-else
-       DYLD_LIBRARY_PATH="$root/cups:$DYLD_LIBRARY_PATH"
+        if test "x$DYLD_LIBRARY_PATH" = x; then
+               DYLD_LIBRARY_PATH="$root/cups"
+        else
+               DYLD_LIBRARY_PATH="$root/cups:$DYLD_LIBRARY_PATH"
+        fi
 fi
 
 # These get exported because they don't have side-effects...