diff --git a/test/pc/e2e/BUILD.gn b/test/pc/e2e/BUILD.gn index 5c1ee9d99b..73a73af384 100644 --- a/test/pc/e2e/BUILD.gn +++ b/test/pc/e2e/BUILD.gn @@ -351,6 +351,7 @@ if (rtc_include_tests) { ":video_quality_metrics_reporter", "../..:field_trial", "../..:fileutils", + "../..:perf_test", "../../../api:audio_quality_analyzer_api", "../../../api:libjingle_peerconnection_api", "../../../api:media_stream_interface", diff --git a/test/pc/e2e/peer_connection_quality_test.cc b/test/pc/e2e/peer_connection_quality_test.cc index c5c9388f15..7802468924 100644 --- a/test/pc/e2e/peer_connection_quality_test.cc +++ b/test/pc/e2e/peer_connection_quality_test.cc @@ -35,6 +35,7 @@ #include "test/pc/e2e/stats_poller.h" #include "test/pc/e2e/test_peer_factory.h" #include "test/testsupport/file_utils.h" +#include "test/testsupport/perf_test.h" namespace webrtc { namespace webrtc_pc_e2e { @@ -342,6 +343,7 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) { real_test_duration_ = end_time - start_time; } + ReportGeneralTestResults(); audio_quality_analyzer_->Stop(); video_quality_analyzer_injection_helper_->Stop(); for (auto& reporter : quality_metrics_reporters_) { @@ -537,9 +539,10 @@ void PeerConnectionE2EQualityTest::SetupCall(const RunParams& run_params) { ExchangeIceCandidates(&signaling_interceptor); // This means that ICE and DTLS are connected. - ASSERT_TRUE_WAIT(bob_->IsIceConnected(), kDefaultTimeoutMs); - ASSERT_TRUE_WAIT(alice_->IsIceConnected(), kDefaultTimeoutMs); - RTC_LOG(INFO) << "Call is started (all peers are connected)."; + WAIT(bob_->IsIceConnected(), kDefaultTimeoutMs); + bob_connected_ = bob_->IsIceConnected(); + WAIT(alice_->IsIceConnected(), kDefaultTimeoutMs); + alice_connected_ = alice_->IsIceConnected(); } void PeerConnectionE2EQualityTest::ExchangeOfferAnswer( @@ -635,6 +638,15 @@ void PeerConnectionE2EQualityTest::TearDownCall() { media_helper_.reset(); } +void PeerConnectionE2EQualityTest::ReportGeneralTestResults() { + test::PrintResult( + "alice_connected", "", test_case_name_, alice_connected_, "unitless", + /*important=*/false, test::ImproveDirection::kBiggerIsBetter); + test::PrintResult( + "bob_connected", "", test_case_name_, bob_connected_, "unitless", + /*important=*/false, test::ImproveDirection::kBiggerIsBetter); +} + Timestamp PeerConnectionE2EQualityTest::Now() const { return clock_->CurrentTime(); } diff --git a/test/pc/e2e/peer_connection_quality_test.h b/test/pc/e2e/peer_connection_quality_test.h index 081235b34b..bbc3d8a1f2 100644 --- a/test/pc/e2e/peer_connection_quality_test.h +++ b/test/pc/e2e/peer_connection_quality_test.h @@ -95,6 +95,7 @@ class PeerConnectionE2EQualityTest const std::vector>& sources); void TearDownCall(); + void ReportGeneralTestResults(); Timestamp Now() const; Clock* const clock_; @@ -132,6 +133,9 @@ class PeerConnectionE2EQualityTest // This task queue will be created before call set up and will be destroyed // immediately before call tear down. std::unique_ptr task_queue_; + + bool alice_connected_ = false; + bool bob_connected_ = false; }; } // namespace webrtc_pc_e2e