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
This commit is contained in:
Pavel Labath 2019-07-24 13:05:56 +00:00
parent 565c54320e
commit 3a12e73f67
1 changed files with 4 additions and 2 deletions

View File

@ -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)