[Lldb-commits] [lldb] r366903 - Fix @skipIfSanitized decorator

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 24 06:05:56 PDT 2019


Author: labath
Date: Wed Jul 24 06:05:56 2019
New Revision: 366903

URL: http://llvm.org/viewvc/llvm-project?rev=366903&view=rev
Log:
Fix @skipIfSanitized decorator

To run the test the decorator function should return None, not False.
Returning anything other than None skips the test.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/decorators.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=366903&r1=366902&r2=366903&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Wed Jul 24 06:05:56 2019
@@ -827,6 +827,8 @@ def skipUnlessFeature(feature):
 def skipIfSanitized(func):
     """Skip this test if the environment is set up to run LLDB itself under ASAN."""
     def is_sanitized():
-        return (('DYLD_INSERT_LIBRARIES' in os.environ) and
-                'libclang_rt.asan' in os.environ['DYLD_INSERT_LIBRARIES'])
+        if (('DYLD_INSERT_LIBRARIES' in os.environ) and
+                'libclang_rt.asan' in os.environ['DYLD_INSERT_LIBRARIES']):
+            return "ASAN unsupported"
+        return None
     return skipTestIfFn(is_sanitized)(func)




More information about the lldb-commits mailing list