Index: compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt =================================================================== --- compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt +++ compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt @@ -7,12 +7,14 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD|SunOS") list(APPEND SUPPORTED_TOOLS asan) endif() -if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID) +if(CMAKE_SYSTEM_NAME MATCHES "NetBSD" OR (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)) list(APPEND SUPPORTED_TOOLS tsan) list(APPEND SUPPORTED_TOOLS msan) - list(APPEND SUPPORTED_TOOLS lsan) list(APPEND SUPPORTED_TOOLS ubsan) endif() +if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID) + list(APPEND SUPPORTED_TOOLS lsan) +endif() # Create a separate config for each tool we support. foreach(tool ${SUPPORTED_TOOLS}) Index: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lit.local.cfg =================================================================== --- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lit.local.cfg +++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lit.local.cfg @@ -0,0 +1,9 @@ +def getRoot(config): + if not config.parent: + return config + return getRoot(config.parent) + +root = getRoot(config) + +if root.host_os not in ['NetBSD']: + config.unsupported = True Index: compiler-rt/trunk/test/sanitizer_common/lit.common.cfg =================================================================== --- compiler-rt/trunk/test/sanitizer_common/lit.common.cfg +++ compiler-rt/trunk/test/sanitizer_common/lit.common.cfg @@ -59,5 +59,5 @@ config.suffixes = ['.c', '.cc', '.cpp'] -if config.host_os not in ['Linux', 'Darwin']: +if config.host_os not in ['Linux', 'Darwin', 'NetBSD']: config.unsupported = True