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 + +int main() { + NSLog(@"Hello world"); +} + +// CHECK: Hello world +// CHECK-NOT: WARNING: ThreadSanitizer 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']: