diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index b28bef811c..47b757a237 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -551,6 +551,10 @@ if (rtc_include_tests) { "//testing/gtest", ] + if (rtc_enable_protobuf) { + deps += [ "call:rtc_event_log_tests" ] + } + if (is_android) { deps += [ "//testing/android/native_test:native_test_support" ] shard_timeout = 900 diff --git a/webrtc/call/BUILD.gn b/webrtc/call/BUILD.gn index 9b2fe9ec2a..05a319210a 100644 --- a/webrtc/call/BUILD.gn +++ b/webrtc/call/BUILD.gn @@ -56,4 +56,24 @@ if (rtc_include_tests) { suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } + rtc_source_set("rtc_event_log_tests") { + testonly = true + sources = [ + "rtc_event_log_unittest.cc", + "rtc_event_log_unittest_helper.cc", + ] + deps = [ + "..:rtc_event_log", + "..:rtc_event_log_parser", + "../modules/rtp_rtcp", + "../system_wrappers:metrics_default", + "//testing/gmock", + "//testing/gtest", + ] + if (is_clang) { + # Suppress warnings from the Chromium Clang plugin. + # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + } } diff --git a/webrtc/call/rtc_event_log_unittest.cc b/webrtc/call/rtc_event_log_unittest.cc index e8f0ccf1c2..34e993cf5c 100644 --- a/webrtc/call/rtc_event_log_unittest.cc +++ b/webrtc/call/rtc_event_log_unittest.cc @@ -8,8 +8,6 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifdef ENABLE_RTC_EVENT_LOG - #include #include #include @@ -459,6 +457,5 @@ TEST(RtcEventLogTest, LogEventAndReadBack) { // Clean up temporary file - can be pretty slow. remove(temp_filename.c_str()); } -} // namespace webrtc -#endif // ENABLE_RTC_EVENT_LOG +} // namespace webrtc diff --git a/webrtc/call/rtc_event_log_unittest_helper.cc b/webrtc/call/rtc_event_log_unittest_helper.cc index 194414f4ba..d7092b8db8 100644 --- a/webrtc/call/rtc_event_log_unittest_helper.cc +++ b/webrtc/call/rtc_event_log_unittest_helper.cc @@ -8,8 +8,6 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifdef ENABLE_RTC_EVENT_LOG - #include "webrtc/call/rtc_event_log_unittest_helper.h" #include @@ -405,5 +403,3 @@ void RtcEventLogTestHelper::VerifyLogEndEvent( } } // namespace webrtc - -#endif // ENABLE_RTC_EVENT_LOG