diff options
author | Yash Tibrewal <yashkt@google.com> | 2018-05-14 15:17:43 -0700 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2018-05-14 15:17:43 -0700 |
commit | 519d2b1fae0657c57acfeec51cf0d56938addf18 (patch) | |
tree | d22c1361a2825b390b16c3f859cfeade13a6539a /test/core/debug | |
parent | ae3866bf6b58bd4a0f4c5d1f2e88e3dcea799213 (diff) |
Cleanup stats removal for opt build. Stats will only be collected on debug builds or if GRPC_COLLECT_STATS is defined.
Diffstat (limited to 'test/core/debug')
-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 } |