Reenabled the RtcEventLog unittests

For some reason the RtcEventLog unit tests were not building and
running. This CL adds these tests to the rtc_unittests target.
They are only built if protobuf support is enabled.

BUG=webrtc:6379
R=stefan@webrtc.org, terelius@webrtc.org

Review URL: https://codereview.webrtc.org/2344383002 .

Cr-Commit-Position: refs/heads/master@{#14295}
This commit is contained in:
skvlad 2016-09-19 14:42:02 -07:00
parent 936405b521
commit e9cac75139
4 changed files with 25 additions and 8 deletions

View File

@ -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

View File

@ -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" ]
}
}
}

View File

@ -8,8 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifdef ENABLE_RTC_EVENT_LOG
#include <map>
#include <memory>
#include <string>
@ -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

View File

@ -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 <string.h>
@ -405,5 +403,3 @@ void RtcEventLogTestHelper::VerifyLogEndEvent(
}
} // namespace webrtc
#endif // ENABLE_RTC_EVENT_LOG