Make pc level smoke tests faster.

They go from 7 seconds each to 2 seconds each with this change, and
I belive they will catch correctness bugs just as well.

With this and https://webrtc-review.googlesource.com/c/src/+/168884,
test_support_unittests now runs in 14 seconds instead of 65 (in
sequential mode).

Bug: None
Change-Id: Ic04e3937bbff54f33dcd062f422dada176f1c3cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168885
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30577}
This commit is contained in:
Patrik Höglund
2020-02-20 14:10:38 +01:00
committed by Commit Bot
parent dbf5416a80
commit f5c1909b54

View File

@ -111,11 +111,11 @@ class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test {
for (auto stream_label : video_analyzer_ptr->GetKnownVideoStreams()) { for (auto stream_label : video_analyzer_ptr->GetKnownVideoStreams()) {
FrameCounters stream_conters = FrameCounters stream_conters =
video_analyzer_ptr->GetPerStreamCounters().at(stream_label); video_analyzer_ptr->GetPerStreamCounters().at(stream_label);
// 150 = 30fps * 5s. On some devices pipeline can be too slow, so it can // On some devices the pipeline can be too slow, so we actually can't
// happen, that frames will stuck in the middle, so we actually can't // force real constraints here. Lets just check, that at least 1
// force real constraints here, so lets just check, that at least 1 frame // frame passed whole pipeline.
// passed whole pipeline. int64_t expected_min_fps = run_params.run_duration.seconds() * 30;
EXPECT_GE(stream_conters.captured, 150); EXPECT_GE(stream_conters.captured, expected_min_fps);
EXPECT_GE(stream_conters.pre_encoded, 1); EXPECT_GE(stream_conters.pre_encoded, 1);
EXPECT_GE(stream_conters.encoded, 1); EXPECT_GE(stream_conters.encoded, 1);
EXPECT_GE(stream_conters.received, 1); EXPECT_GE(stream_conters.received, 1);
@ -134,7 +134,7 @@ class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test {
#define MAYBE_Smoke Smoke #define MAYBE_Smoke Smoke
#endif #endif
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) { TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) {
RunParams run_params(TimeDelta::Seconds(7)); RunParams run_params(TimeDelta::Seconds(2));
run_params.video_codecs = { run_params.video_codecs = {
VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})}; VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})};
run_params.use_flex_fec = true; run_params.use_flex_fec = true;
@ -188,7 +188,7 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) {
#define MAYBE_Echo Echo #define MAYBE_Echo Echo
#endif #endif
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Echo) { TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Echo) {
RunParams run_params(TimeDelta::Seconds(7)); RunParams run_params(TimeDelta::Seconds(2));
run_params.echo_emulation_config = EchoEmulationConfig(); run_params.echo_emulation_config = EchoEmulationConfig();
RunTest( RunTest(
"smoke", run_params, "smoke", run_params,
@ -218,7 +218,7 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Echo) {
#define MAYBE_Simulcast Simulcast #define MAYBE_Simulcast Simulcast
#endif #endif
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Simulcast) { TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Simulcast) {
RunParams run_params(TimeDelta::Seconds(7)); RunParams run_params(TimeDelta::Seconds(2));
run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)}; run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
RunTest( RunTest(
"simulcast", run_params, "simulcast", run_params,
@ -256,7 +256,7 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Simulcast) {
#define MAYBE_Svc Svc #define MAYBE_Svc Svc
#endif #endif
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) { TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) {
RunParams run_params(TimeDelta::Seconds(7)); RunParams run_params(TimeDelta::Seconds(2));
run_params.video_codecs = {VideoCodecConfig(cricket::kVp9CodecName)}; run_params.video_codecs = {VideoCodecConfig(cricket::kVp9CodecName)};
RunTest( RunTest(
"simulcast", run_params, "simulcast", run_params,
@ -296,7 +296,7 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) {
#define MAYBE_HighBitrate HighBitrate #define MAYBE_HighBitrate HighBitrate
#endif #endif
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_HighBitrate) { TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_HighBitrate) {
RunParams run_params(TimeDelta::Seconds(7)); RunParams run_params(TimeDelta::Seconds(2));
run_params.video_codecs = { run_params.video_codecs = {
VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})}; VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})};