Add directive to make TRACE_EVENT macros optional.

Bug: webrtc:11132
Change-Id: I801994ad262e1acff73e4c20afd7a7343b56268c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160654
Commit-Queue: Doudou Kisabaka <doudouk@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29949}
This commit is contained in:
Doudou Kisabaka
2019-11-28 14:24:31 +01:00
committed by Commit Bot
parent b8306cc9bb
commit 2dec496f80
7 changed files with 188 additions and 27 deletions

View File

@ -998,7 +998,10 @@ TEST_F(RTCStatsIntegrationTest, GetStatsFromCaller) {
rtc::scoped_refptr<const RTCStatsReport> report = GetStatsFromCaller();
RTCStatsReportVerifier(report.get()).VerifyReport({});
#if RTC_TRACE_EVENTS_ENABLED
EXPECT_EQ(report->ToJson(), RTCStatsReportTraceListener::last_trace());
#endif
}
TEST_F(RTCStatsIntegrationTest, GetStatsFromCallee) {
@ -1006,7 +1009,10 @@ TEST_F(RTCStatsIntegrationTest, GetStatsFromCallee) {
rtc::scoped_refptr<const RTCStatsReport> report = GetStatsFromCallee();
RTCStatsReportVerifier(report.get()).VerifyReport({});
#if RTC_TRACE_EVENTS_ENABLED
EXPECT_EQ(report->ToJson(), RTCStatsReportTraceListener::last_trace());
#endif
}
// These tests exercise the integration of the stats selection algorithm inside
@ -1086,8 +1092,10 @@ TEST_F(RTCStatsIntegrationTest,
// Any pending stats requests should have completed in the act of destroying
// the peer connection.
ASSERT_TRUE(stats_obtainer->report());
#if RTC_TRACE_EVENTS_ENABLED
EXPECT_EQ(stats_obtainer->report()->ToJson(),
RTCStatsReportTraceListener::last_trace());
#endif
}
TEST_F(RTCStatsIntegrationTest, GetsStatsWhileClosingPeerConnection) {
@ -1099,8 +1107,10 @@ TEST_F(RTCStatsIntegrationTest, GetsStatsWhileClosingPeerConnection) {
caller_->pc()->Close();
ASSERT_TRUE(stats_obtainer->report());
#if RTC_TRACE_EVENTS_ENABLED
EXPECT_EQ(stats_obtainer->report()->ToJson(),
RTCStatsReportTraceListener::last_trace());
#endif
}
// GetStatsReferencedIds() is optimized to recognize what is or isn't a