[PATCH] D42236: Enable sanitizer_common tests on NetBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 02:42:37 PST 2018


krytarowski updated this revision to Diff 130379.
krytarowski added a comment.

Include here test/sanitizer_common/TestCases/NetBSD/lit.local.cfg


Repository:
  rL LLVM

https://reviews.llvm.org/D42236

Files:
  test/sanitizer_common/CMakeLists.txt
  test/sanitizer_common/TestCases/NetBSD/lit.local.cfg
  test/sanitizer_common/lit.common.cfg


Index: test/sanitizer_common/lit.common.cfg
===================================================================
--- test/sanitizer_common/lit.common.cfg
+++ 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
Index: test/sanitizer_common/TestCases/NetBSD/lit.local.cfg
===================================================================
--- /dev/null
+++ 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: test/sanitizer_common/CMakeLists.txt
===================================================================
--- test/sanitizer_common/CMakeLists.txt
+++ 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})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42236.130379.patch
Type: text/x-patch
Size: 1621 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180118/4c2a60e9/attachment.bin>


More information about the llvm-commits mailing list