From 3a12e73f6729db2ad4e3c3c8624aff56263f06ba Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 24 Jul 2019 13:05:56 +0000 Subject: [PATCH] Fix @skipIfSanitized decorator To run the test the decorator function should return None, not False. Returning anything other than None skips the test. llvm-svn: 366903 --- lldb/packages/Python/lldbsuite/test/decorators.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index c4343b3..5c69c18 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -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) -- 2.7.4