diff options
Diffstat (limited to 'test/core/debug/stats_test.cc')
-rw-r--r-- | test/core/debug/stats_test.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/core/debug/stats_test.cc b/test/core/debug/stats_test.cc index 949a88f8f0..aeb13655bf 100644 --- a/test/core/debug/stats_test.cc +++ b/test/core/debug/stats_test.cc @@ -142,9 +142,14 @@ INSTANTIATE_TEST_CASE_P(HistogramTestCases, HistogramTest, } // namespace grpc int main(int argc, char** argv) { +/* Only run this test if GRPC_COLLECT_STATS is defined or if it is a debug + * build. + */ +#if defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) ::testing::InitGoogleTest(&argc, argv); grpc_init(); int ret = RUN_ALL_TESTS(); grpc_shutdown(); return ret; +#endif } |