From 38dd7485c0bec2720c75789f26f5d549e9b4a541 Mon Sep 17 00:00:00 2001 From: kosak Date: Tue, 14 Jul 2015 21:49:27 +0000 Subject: Change GetDefaultFilter to allow for the injection of a custom filter. --- src/gtest.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/gtest.cc b/src/gtest.cc index 8b767074..6dea6c6a 100644 --- a/src/gtest.cc +++ b/src/gtest.cc @@ -189,6 +189,12 @@ bool g_help_flag = false; } // namespace internal static const char* GetDefaultFilter() { +#ifdef GTEST_TEST_FILTER_ENV_VAR_ + const char* const testbridge_test_only = getenv(GTEST_TEST_FILTER_ENV_VAR_); + if (testbridge_test_only != NULL) { + return testbridge_test_only; + } +#endif // GTEST_TEST_FILTER_ENV_VAR_ return kUniversalFilter; } -- cgit v1.2.3