[PATCH] D14610: [tsan] Add a Darwin-specific lit test directory

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 05:30:23 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL252887: [tsan] Add a Darwin-specific lit test directory (authored by kuba.brecka).

Changed prior to commit:
  http://reviews.llvm.org/D14610?vs=40032&id=40037#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14610

Files:
  compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg
  compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm
  compiler-rt/trunk/test/tsan/lit.cfg

Index: compiler-rt/trunk/test/tsan/lit.cfg
===================================================================
--- compiler-rt/trunk/test/tsan/lit.cfg
+++ compiler-rt/trunk/test/tsan/lit.cfg
@@ -64,7 +64,7 @@
 config.substitutions.append( ("%deflake ", os.path.join(os.path.dirname(__file__), "deflake.bash")) )
 
 # Default test suffixes.
-config.suffixes = ['.c', '.cc', '.cpp']
+config.suffixes = ['.c', '.cc', '.cpp', '.m', '.mm']
 
 # ThreadSanitizer tests are currently supported on FreeBSD, Linux and Darwin.
 if config.host_os not in ['FreeBSD', 'Linux', 'Darwin']:
Index: compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg
===================================================================
--- compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg
+++ compiler-rt/trunk/test/tsan/Darwin/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 ['Darwin']:
+  config.unsupported = True
Index: compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm
===================================================================
--- compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm
+++ compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm
@@ -0,0 +1,13 @@
+// Test that a simple Obj-C program runs and exits without any warnings.
+
+// RUN: %clang_tsan %s -o %t -framework Foundation
+// RUN: %run %t 2>&1
+
+#import <Foundation/Foundation.h>
+
+int main() {
+  NSLog(@"Hello world");
+}
+
+// CHECK: Hello world
+// CHECK-NOT: WARNING: ThreadSanitizer


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14610.40037.patch
Type: text/x-patch
Size: 1559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151112/61b36816/attachment.bin>


More information about the llvm-commits mailing list