From 65b2d8ad21474991f3154519bd9e79d1244ff8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Thu, 19 May 2022 16:06:23 +0200 Subject: [PATCH] Move RunLoop test class to its own build target To make it usable in tests without depending on all of CallTest. Bug: None Change-Id: Ie3102ab71bcfe3862dd6c35d3285098e961e54df Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262807 Reviewed-by: Tomas Gunnarsson Commit-Queue: Niels Moller Cr-Commit-Position: refs/heads/main@{#36932} --- call/BUILD.gn | 1 + modules/rtp_rtcp/BUILD.gn | 2 +- modules/video_coding/BUILD.gn | 2 +- pc/BUILD.gn | 4 ++-- rtc_tools/BUILD.gn | 1 + test/BUILD.gn | 18 +++++++++++++++--- test/fuzzers/utils/BUILD.gn | 2 +- video/BUILD.gn | 1 + 8 files changed, 23 insertions(+), 8 deletions(-) diff --git a/call/BUILD.gn b/call/BUILD.gn index 6b92d28c2a..18bc566bde 100644 --- a/call/BUILD.gn +++ b/call/BUILD.gn @@ -516,6 +516,7 @@ if (rtc_include_tests) { "../test:field_trial", "../test:mock_frame_transformer", "../test:mock_transport", + "../test:run_loop", "../test:scoped_key_value_config", "../test:test_common", "../test:test_support", diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index 86c25a41fe..b8299f305d 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -653,7 +653,7 @@ if (rtc_include_tests) { "../../test:mock_frame_transformer", "../../test:mock_transport", "../../test:rtp_test_utils", - "../../test:test_common", + "../../test:run_loop", "../../test:test_support", "../../test/time_controller:time_controller", "../video_coding:codec_globals_headers", diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index 798a1be2eb..3e74ca95b8 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -1279,8 +1279,8 @@ if (rtc_include_tests) { "../../test:fake_video_codecs", "../../test:field_trial", "../../test:fileutils", + "../../test:run_loop", "../../test:scoped_key_value_config", - "../../test:test_common", "../../test:test_support", "../../test:video_test_common", "../../test:video_test_support", diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 066723547a..79a7440bf1 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -2176,8 +2176,8 @@ if (rtc_include_tests && !build_with_chromium) { "../rtc_base/third_party/sigslot", "../system_wrappers:metrics", "../test:explicit_key_value_config", + "../test:run_loop", "../test:scoped_key_value_config", - "../test:test_common", "../test:test_main", "../test:test_support", "//third_party/abseil-cpp/absl/algorithm:container", @@ -2459,8 +2459,8 @@ if (rtc_include_tests && !build_with_chromium) { "../rtc_base/third_party/base64", "../rtc_base/third_party/sigslot", "../system_wrappers:metrics", + "../test:run_loop", "../test:scoped_key_value_config", - "../test:test_common", "../test/pc/sctp:fake_sctp_transport", "//third_party/abseil-cpp/absl/algorithm:container", "//third_party/abseil-cpp/absl/memory", diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index e02f8d9040..edaaa8bc31 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -260,6 +260,7 @@ if (!is_component_build) { "../test:fake_video_codecs", "../test:null_transport", "../test:rtp_test_utils", + "../test:run_loop", "../test:run_test", "../test:run_test_interface", "../test:test_common", diff --git a/test/BUILD.gn b/test/BUILD.gn index 2baf435dfb..caa998a748 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -541,8 +541,8 @@ if (rtc_include_tests && !build_with_chromium) { ":perf_test", ":rtc_expect_death", ":rtp_test_utils", + ":run_loop", ":scoped_key_value_config", - ":test_common", ":test_main", ":test_support", ":test_support_test_artifacts", @@ -863,6 +863,19 @@ rtc_library("rtc_expect_death") { deps = [ ":test_support" ] } +rtc_library("run_loop") { + testonly = true + sources = [ + "run_loop.cc", + "run_loop.h", + ] + deps = [ + "../rtc_base:threading", + "../rtc_base:timeutils", + "../rtc_base/task_utils:to_queued_task", + ] +} + rtc_library("test_common") { testonly = true sources = [ @@ -874,8 +887,6 @@ rtc_library("test_common") { "layer_filtering_transport.cc", "layer_filtering_transport.h", "rtp_rtcp_observer.h", - "run_loop.cc", - "run_loop.h", "video_decoder_proxy_factory.h", "video_encoder_nullable_proxy_factory.h", "video_encoder_proxy_factory.h", @@ -887,6 +898,7 @@ rtc_library("test_common") { ":fake_video_codecs", ":fileutils", ":mock_transport", + ":run_loop", ":scoped_key_value_config", ":test_support", ":video_test_common", diff --git a/test/fuzzers/utils/BUILD.gn b/test/fuzzers/utils/BUILD.gn index 585719c9a8..5b85f418b8 100644 --- a/test/fuzzers/utils/BUILD.gn +++ b/test/fuzzers/utils/BUILD.gn @@ -35,9 +35,9 @@ rtc_library("rtp_replayer") { "../../../test:fake_video_codecs", "../../../test:null_transport", "../../../test:rtp_test_utils", + "../../../test:run_loop", "../../../test:run_test", "../../../test:run_test_interface", - "../../../test:test_common", "../../../test:test_renderer", "../../../test:test_support", "../../../test:video_test_common", diff --git a/video/BUILD.gn b/video/BUILD.gn index 980e5b5b54..55950729e0 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn @@ -968,6 +968,7 @@ if (rtc_include_tests) { "../test:null_transport", "../test:perf_test", "../test:rtp_test_utils", + "../test:run_loop", "../test:scoped_key_value_config", "../test:test_common", "../test:test_support",