From 2bd4129e910683af471eefad320c755af4376e4a Mon Sep 17 00:00:00 2001 From: Sergey Silkin Date: Mon, 12 Feb 2024 17:19:06 +0100 Subject: [PATCH] Set scoped field trials in encode/decode test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since not all codecs read field trials from the environment yet. Bug: webrtc:14852 Change-Id: Ia2477c41d09dabf91f47c59eb3139d6d6a711548 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339380 Auto-Submit: Sergey Silkin Reviewed-by: Åsa Persson Commit-Queue: Åsa Persson Cr-Commit-Position: refs/heads/main@{#41731} --- modules/video_coding/BUILD.gn | 1 + modules/video_coding/codecs/test/video_codec_test.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index e926ff84d7..ce0a9f1e5e 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -1015,6 +1015,7 @@ if (rtc_include_tests) { "../../rtc_base:logging", "../../rtc_base:stringutils", "../../test:explicit_key_value_config", + "../../test:field_trial", "../../test:fileutils", "../../test:test_flags", "../../test:test_main", diff --git a/modules/video_coding/codecs/test/video_codec_test.cc b/modules/video_coding/codecs/test/video_codec_test.cc index b6d5967589..0811685e33 100644 --- a/modules/video_coding/codecs/test/video_codec_test.cc +++ b/modules/video_coding/codecs/test/video_codec_test.cc @@ -29,6 +29,7 @@ #include "rtc_base/logging.h" #include "rtc_base/strings/string_builder.h" #include "test/explicit_key_value_config.h" +#include "test/field_trial.h" #include "test/gtest.h" #include "test/test_flags.h" #include "test/testsupport/file_utils.h" @@ -533,6 +534,7 @@ INSTANTIATE_TEST_SUITE_P( FramerateAdaptationTest::TestParamsToString); TEST(VideoCodecTest, DISABLED_EncodeDecode) { + ScopedFieldTrials field_trials(absl::GetFlag(FLAGS_field_trials)); const Environment env = CreateEnvironment(std::make_unique( absl::GetFlag(FLAGS_field_trials)));