aboutsummaryrefslogtreecommitdiff
path: root/lib/tsan/tests/unit/tsan_unit_test_main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tsan/tests/unit/tsan_unit_test_main.cc')
-rw-r--r--lib/tsan/tests/unit/tsan_unit_test_main.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/tsan/tests/unit/tsan_unit_test_main.cc b/lib/tsan/tests/unit/tsan_unit_test_main.cc
new file mode 100644
index 000000000000..84d94dd03748
--- /dev/null
+++ b/lib/tsan/tests/unit/tsan_unit_test_main.cc
@@ -0,0 +1,19 @@
+//===-- tsan_unit_test_main.cc --------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of ThreadSanitizer (TSan), a race detector.
+//
+//===----------------------------------------------------------------------===//
+#include "gtest/gtest.h"
+
+int main(int argc, char **argv) {
+ testing::GTEST_FLAG(death_test_style) = "threadsafe";
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}