diff options
author | Kuba Brecka <kuba.brecka@gmail.com> | 2015-11-12 13:27:55 +0000 |
---|---|---|
committer | Kuba Brecka <kuba.brecka@gmail.com> | 2015-11-12 13:27:55 +0000 |
commit | 6fe6fab4b8d8fce7217f155f27b33c843a39cc98 (patch) | |
tree | 017c09f8d1a434224357e623db335938d06e7d04 /test/tsan/Darwin | |
parent | 9b0f5707366abaf42675bf01f261e787e6b36f98 (diff) |
[tsan] Add a Darwin-specific lit test directory
Differential Revision: http://reviews.llvm.org/D14610
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan/Darwin')
-rw-r--r-- | test/tsan/Darwin/lit.local.cfg | 9 | ||||
-rw-r--r-- | test/tsan/Darwin/objc-simple.mm | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/tsan/Darwin/lit.local.cfg b/test/tsan/Darwin/lit.local.cfg new file mode 100644 index 000000000..a85dfcd24 --- /dev/null +++ b/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 diff --git a/test/tsan/Darwin/objc-simple.mm b/test/tsan/Darwin/objc-simple.mm new file mode 100644 index 000000000..a4bf1f1be --- /dev/null +++ b/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 |