[tsan] Add a Darwin-specific lit test directory
Differential Revision: http://reviews.llvm.org/D14610 llvm-svn: 252887
This commit is contained in:
parent
797c2aec6b
commit
e342469c0a
|
@ -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
|
|
@ -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
|
|
@ -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']:
|
||||
|
|
Loading…
Reference in New Issue