diff options
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cpp')
-rw-r--r-- | compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cpp new file mode 100644 index 00000000000..caab5ec288e --- /dev/null +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cpp @@ -0,0 +1,23 @@ +//===-- sanitizer_test_main.cpp -------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file is a part of ThreadSanitizer/AddressSanitizer runtime. +// +//===----------------------------------------------------------------------===// +#include "gtest/gtest.h" +#include "sanitizer_common/sanitizer_flags.h" + +const char *argv0; + +int main(int argc, char **argv) { + argv0 = argv[0]; + testing::GTEST_FLAG(death_test_style) = "threadsafe"; + testing::InitGoogleTest(&argc, argv); + __sanitizer::SetCommonFlagsDefaults(); + return RUN_ALL_TESTS(); +} |