[PATCH] D42236: Enable sanitizer_common tests on NetBSD

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 03:51:10 PST 2018


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL322842: Enable sanitizer_common tests on NetBSD (authored by kamil, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D42236?vs=130379&id=130392#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42236

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


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


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


More information about the llvm-commits mailing list