Index: webrtc/voice_engine/test/auto_test/standard/codec_test.cc |
diff --git a/webrtc/voice_engine/test/auto_test/standard/codec_test.cc b/webrtc/voice_engine/test/auto_test/standard/codec_test.cc |
index 5a500af2df4f256b46e2d3dc31fec8d7150ffd87..3a3d83031d3e932661ecef1b4fb15c060c757cae 100644 |
--- a/webrtc/voice_engine/test/auto_test/standard/codec_test.cc |
+++ b/webrtc/voice_engine/test/auto_test/standard/codec_test.cc |
@@ -176,6 +176,30 @@ |
} |
} |
+#ifdef ENABLE_RTC_EVENT_LOG |
+TEST_F(CodecTest, RtcEventLogIntegrationTest) { |
+ webrtc::RtcEventLog* event_log = voe_codec_->GetEventLog(); |
+ ASSERT_TRUE(event_log); |
+ |
+ // Find the name of the current test, in order to use it as a temporary |
+ // filename. |
+ auto test_info = ::testing::UnitTest::GetInstance()->current_test_info(); |
+ const std::string temp_filename = webrtc::test::OutputPath() + |
+ test_info->test_case_name() + |
+ test_info->name(); |
+ // Create a log file. |
+ event_log->StartLogging(temp_filename, 1000); |
+ event_log->StopLogging(); |
+ |
+ // Check if the file has been created. |
+ FILE* event_file = fopen(temp_filename.c_str(), "r"); |
+ ASSERT_TRUE(event_file); |
+ fclose(event_file); |
+ // Remove the temporary file. |
+ remove(temp_filename.c_str()); |
+} |
+#endif // ENABLE_RTC_EVENT_LOG |
+ |
// TODO(xians, phoglund): Re-enable when issue 372 is resolved. |
TEST_F(CodecTest, DISABLED_ManualVerifySendCodecsForAllPacketSizes) { |
for (int i = 0; i < voe_codec_->NumOfCodecs(); ++i) { |