Index: lib/asan/tests/asan_test_config.h =================================================================== --- lib/asan/tests/asan_test_config.h +++ lib/asan/tests/asan_test_config.h @@ -21,12 +21,6 @@ #include #include -#if ASAN_USE_DEJAGNU_GTEST -# include "dejagnu-gtest.h" -#else -# include "gtest/gtest.h" -#endif - using std::string; using std::vector; using std::map; Index: lib/asan/tests/asan_test_utils.h =================================================================== --- lib/asan/tests/asan_test_utils.h +++ lib/asan/tests/asan_test_utils.h @@ -14,7 +14,7 @@ #ifndef ASAN_TEST_UTILS_H #define ASAN_TEST_UTILS_H -#if !defined(ASAN_EXTERNAL_TEST_CONFIG) +#if !defined(SANITIZER_EXTERNAL_TEST_CONFIG) # define INCLUDED_FROM_ASAN_TEST_UTILS_H # include "asan_test_config.h" # undef INCLUDED_FROM_ASAN_TEST_UTILS_H Index: lib/sanitizer_common/tests/CMakeLists.txt =================================================================== --- lib/sanitizer_common/tests/CMakeLists.txt +++ lib/sanitizer_common/tests/CMakeLists.txt @@ -27,6 +27,7 @@ set(SANITIZER_TEST_HEADERS sanitizer_pthread_wrappers.h + sanitizer_test_config.h sanitizer_test_utils.h) foreach(header ${SANITIZER_HEADERS}) list(APPEND SANITIZER_TEST_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../${header}) Index: lib/sanitizer_common/tests/sanitizer_pthread_wrappers.h =================================================================== --- lib/sanitizer_common/tests/sanitizer_pthread_wrappers.h +++ lib/sanitizer_common/tests/sanitizer_pthread_wrappers.h @@ -20,8 +20,6 @@ #include "sanitizer_test_utils.h" -#include "gtest/gtest.h" - #if !defined(_WIN32) # include // Simply forward the arguments and check that the pthread functions succeed. Index: lib/sanitizer_common/tests/sanitizer_test_config.h =================================================================== --- lib/sanitizer_common/tests/sanitizer_test_config.h +++ lib/sanitizer_common/tests/sanitizer_test_config.h @@ -1,4 +1,4 @@ -//===-- asan_test_config.h --------------------------------------*- C++ -*-===// +//===-- sanitizer_test_config.h ---------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,54 +7,24 @@ // //===----------------------------------------------------------------------===// // -// This file is a part of AddressSanitizer, an address sanity checker. +// This file is a part of *Sanitizer runtime. // //===----------------------------------------------------------------------===// -#if !defined(INCLUDED_FROM_ASAN_TEST_UTILS_H) -# error "This file should be included into asan_test_utils.h only" +#if !defined(INCLUDED_FROM_SANITIZER_TEST_UTILS_H) +# error "This file should be included into sanitizer_test_utils.h only" #endif -#ifndef ASAN_TEST_CONFIG_H -#define ASAN_TEST_CONFIG_H +#ifndef SANITIZER_TEST_CONFIG_H +#define SANITIZER_TEST_CONFIG_H #include #include #include -#if ASAN_USE_DEJAGNU_GTEST +#if SANITIZER_USE_DEJAGNU_GTEST # include "dejagnu-gtest.h" #else # include "gtest/gtest.h" #endif -using std::string; -using std::vector; -using std::map; - -#ifndef ASAN_UAR -# error "please define ASAN_UAR" -#endif - -#ifndef ASAN_HAS_EXCEPTIONS -# error "please define ASAN_HAS_EXCEPTIONS" -#endif - -#ifndef ASAN_HAS_BLACKLIST -# error "please define ASAN_HAS_BLACKLIST" -#endif - -#ifndef ASAN_NEEDS_SEGV -# if defined(_WIN32) -# define ASAN_NEEDS_SEGV 0 -# else -# define ASAN_NEEDS_SEGV 1 -# endif -#endif - -#ifndef ASAN_AVOID_EXPENSIVE_TESTS -# define ASAN_AVOID_EXPENSIVE_TESTS 0 -#endif - -#define ASAN_PCRE_DOTALL "" - -#endif // ASAN_TEST_CONFIG_H +#endif // SANITIZER_TEST_CONFIG_H Index: lib/sanitizer_common/tests/sanitizer_test_utils.h =================================================================== --- lib/sanitizer_common/tests/sanitizer_test_utils.h +++ lib/sanitizer_common/tests/sanitizer_test_utils.h @@ -23,6 +23,12 @@ # undef min #endif +#if !defined(SANITIZER_EXTERNAL_TEST_CONFIG) +# define INCLUDED_FROM_SANITIZER_TEST_UTILS_H +# include "sanitizer_test_config.h" +# undef INCLUDED_FROM_SANITIZER_TEST_UTILS_H +#endif + #include #if defined(_MSC_VER)