[tsan] Add a Darwin-specific lit test directory

Differential Revision: http://reviews.llvm.org/D14610

llvm-svn: 252887
This commit is contained in:
Kuba Brecka 2015-11-12 13:27:55 +00:00
parent 797c2aec6b
commit e342469c0a
3 changed files with 23 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -64,7 +64,7 @@ config.substitutions.append( ('CHECK-%os', ("CHECK-" + config.host_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']: