[compiler-rt] r322842 - Enable sanitizer_common tests on NetBSD

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 03:49:45 PST 2018


Author: kamil
Date: Thu Jan 18 03:49:45 2018
New Revision: 322842

URL: http://llvm.org/viewvc/llvm-project?rev=322842&view=rev
Log:
Enable sanitizer_common tests on NetBSD

Summary:
NetBSD can handle asan, ubsan, msan, tsan tests
on 64-bit and when applicable 32-bit X86 OS.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka

Subscribers: srhines, llvm-commits, kubamracek, mgorny, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D42236

Added:
    compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lit.local.cfg
Modified:
    compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
    compiler-rt/trunk/test/sanitizer_common/lit.common.cfg

Modified: compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt?rev=322842&r1=322841&r2=322842&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt Thu Jan 18 03:49:45 2018
@@ -7,12 +7,14 @@ set(SUPPORTED_TOOLS)
 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})

Added: compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lit.local.cfg?rev=322842&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lit.local.cfg (added)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/NetBSD/lit.local.cfg Thu Jan 18 03:49:45 2018
@@ -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

Modified: compiler-rt/trunk/test/sanitizer_common/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/lit.common.cfg?rev=322842&r1=322841&r2=322842&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/lit.common.cfg (original)
+++ compiler-rt/trunk/test/sanitizer_common/lit.common.cfg Thu Jan 18 03:49:45 2018
@@ -59,5 +59,5 @@ config.substitutions.append( ('%env_tool
 
 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




More information about the llvm-commits mailing list