[compiler-rt] r252887 - [tsan] Add a Darwin-specific lit test directory
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 05:27:55 PST 2015
Author: kuba.brecka
Date: Thu Nov 12 07:27:55 2015
New Revision: 252887
URL: http://llvm.org/viewvc/llvm-project?rev=252887&view=rev
Log:
[tsan] Add a Darwin-specific lit test directory
Differential Revision: http://reviews.llvm.org/D14610
Added:
compiler-rt/trunk/test/tsan/Darwin/
compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg
compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm
Modified:
compiler-rt/trunk/test/tsan/lit.cfg
Added: compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg?rev=252887&view=auto
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg (added)
+++ compiler-rt/trunk/test/tsan/Darwin/lit.local.cfg Thu Nov 12 07:27:55 2015
@@ -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
Added: compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm?rev=252887&view=auto
==============================================================================
--- compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm (added)
+++ compiler-rt/trunk/test/tsan/Darwin/objc-simple.mm Thu Nov 12 07:27:55 2015
@@ -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
Modified: compiler-rt/trunk/test/tsan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/lit.cfg?rev=252887&r1=252886&r2=252887&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/lit.cfg (original)
+++ compiler-rt/trunk/test/tsan/lit.cfg Thu Nov 12 07:27:55 2015
@@ -64,7 +64,7 @@ config.substitutions.append( ('CHECK-%os
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']:
More information about the llvm-commits
mailing list