mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-09 05:31:37 +00:00
[LibFuzzer] Disable building and running LSan tests on Apple platforms because LSan is not currently supported.
Differential Revision: http://reviews.llvm.org/D20947 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271979 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
48ff9d62da
commit
ef07357b2f
@ -93,6 +93,16 @@ set(Tests
|
||||
TimeoutTest
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
# LeakSanitizer is not supported on OSX right now
|
||||
set(HAS_LSAN 0)
|
||||
message(WARNING "LeakSanitizer is not supported on Apple platforms."
|
||||
" Building and running LibFuzzer LeakSanitizer tests is disabled."
|
||||
)
|
||||
else()
|
||||
set(HAS_LSAN 1)
|
||||
endif()
|
||||
|
||||
foreach(Test ${Tests})
|
||||
add_libfuzzer_test(${Test} SOURCES ${Test}.cpp)
|
||||
endforeach()
|
||||
|
@ -1,3 +1,4 @@
|
||||
REQUIRES: lsan
|
||||
RUN: not LLVMFuzzer-LeakTest -runs=100000 -detect_leaks=1 2>&1 | FileCheck %s --check-prefix=LEAK_DURING
|
||||
LEAK_DURING: ERROR: LeakSanitizer: detected memory leaks
|
||||
LEAK_DURING: Direct leak of 4 byte(s) in 1 object(s) allocated from:
|
||||
|
@ -19,3 +19,9 @@ if config.has_dfsan:
|
||||
else:
|
||||
lit_config.note('dfsan feature unavailable')
|
||||
|
||||
if config.has_lsan:
|
||||
lit_config.note('lsan feature available')
|
||||
config.available_features.add('lsan')
|
||||
else:
|
||||
lit_config.note('lsan feature unavailable')
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
|
||||
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
|
||||
config.has_dfsan = True if @HAS_DFSAN@ == 1 else False
|
||||
config.has_lsan = True if @HAS_LSAN@ == 1 else False
|
||||
lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")
|
||||
|
Loading…
Reference in New Issue
Block a user