Removing useless dependencies on //testing/gmock.
If a WebRTC build target requires gmock it has to include test/gmock.h and just depend on //test:test_support. Unfortunately //testtest_support was a leaky abstraction because it wasn't propagating the correct -I compiler flag. To make everything work, all the targets that use gmock started also to depend on //testing/gmock (even if they were not including any gmock header directly). This CL makes //testtest_support propagate the include path up in the dependency chain so it is possible to remove unused dependencies. Note: all_dependent_configs should probably be used in the original gmock target. There is an ongoing discussion about it. This CL solves the problem on WebRTC side and it is forward compatible. TBR=phoglund@webrtc.org Bug: webrtc:8603 Change-Id: If08daf2ce9a6431a6e881a236743b4ec33b59ea7 Reviewed-on: https://webrtc-review.googlesource.com/44340 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Oleh Prypin <oprypin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21776}
This commit is contained in:

committed by
Commit Bot

parent
5e4833cc90
commit
65ce31158f
@ -322,7 +322,6 @@ if (rtc_include_tests) {
|
||||
deps = [
|
||||
":audio_mixer_api",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
]
|
||||
}
|
||||
|
||||
@ -336,7 +335,6 @@ if (rtc_include_tests) {
|
||||
deps = [
|
||||
":libjingle_peerconnection_api",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
]
|
||||
}
|
||||
|
||||
@ -350,7 +348,6 @@ if (rtc_include_tests) {
|
||||
deps = [
|
||||
"../api/video_codecs:video_codecs_api",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,6 @@ if (rtc_include_tests) {
|
||||
"../isac:audio_encoder_isac_float",
|
||||
"../opus:audio_decoder_opus",
|
||||
"../opus:audio_encoder_opus",
|
||||
"//testing/gmock",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +152,6 @@ if (rtc_include_tests) {
|
||||
"../test:test_common",
|
||||
"../test:test_support",
|
||||
"utility:utility_tests",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
@ -183,7 +182,6 @@ if (rtc_include_tests) {
|
||||
"../test:fake_audio_device",
|
||||
"../test:test_common",
|
||||
"../test:test_main",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
if (is_android) {
|
||||
@ -237,7 +235,6 @@ if (rtc_include_tests) {
|
||||
"../test:single_threaded_task_queue",
|
||||
"../test:test_common",
|
||||
"../test:test_main",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
|
@ -235,7 +235,6 @@ if (rtc_include_tests) {
|
||||
"../test:test_common",
|
||||
"../test:test_support",
|
||||
"../test:video_test_common",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
@ -296,7 +295,6 @@ if (rtc_include_tests) {
|
||||
"../modules/congestion_controller:congestion_controller",
|
||||
"../modules/pacing:pacing",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,6 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:rtc_base_tests_utils",
|
||||
"../system_wrappers:cpu_features_api",
|
||||
"../test:test_main",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
|
@ -117,7 +117,6 @@ if (rtc_include_tests) {
|
||||
"../system_wrappers:system_wrappers",
|
||||
"../test:test_main",
|
||||
"../test:video_test_common",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
"//third_party/libyuv",
|
||||
]
|
||||
|
@ -198,7 +198,6 @@ if (rtc_enable_protobuf) {
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base:rtc_base_tests_utils",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
|
@ -457,7 +457,6 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base:rtc_base_tests_utils",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
||||
|
@ -89,7 +89,6 @@ if (rtc_include_tests) {
|
||||
"audio_coding:audio_coding_modules_tests",
|
||||
"rtp_rtcp:rtp_rtcp_modules_tests",
|
||||
"video_coding:video_coding_modules_tests",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
|
@ -2182,7 +2182,6 @@ if (rtc_include_tests) {
|
||||
"../../test:rtp_test_utils",
|
||||
"../../test:test_common",
|
||||
"../../test:test_support",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
|
@ -322,7 +322,6 @@ if (rtc_include_tests) {
|
||||
"../../sdk:audio_objc",
|
||||
"../../system_wrappers",
|
||||
"../../test:test_support",
|
||||
"//testing/gmock",
|
||||
"//third_party/ocmock",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
@ -348,7 +347,6 @@ if (rtc_include_tests) {
|
||||
"../../system_wrappers",
|
||||
"../../test:test_support",
|
||||
"../utility:utility",
|
||||
"//testing/gmock",
|
||||
]
|
||||
if (is_linux || is_mac || is_win) {
|
||||
sources += [ "audio_device_unittest.cc" ]
|
||||
|
@ -90,7 +90,6 @@ if (rtc_include_tests) {
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../rtc_base:rtc_task_queue",
|
||||
"../../test:test_support",
|
||||
"//testing/gmock",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -607,7 +607,6 @@ if (rtc_include_tests) {
|
||||
"../audio_coding:neteq_input_audio_tools",
|
||||
"aec_dump:mock_aec_dump_unittests",
|
||||
"test/conversational_speech:unittest",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
|
@ -36,7 +36,6 @@ rtc_source_set("mock_aec_dump") {
|
||||
public_deps = [
|
||||
"../..:module_api",
|
||||
"../../../test:test_support",
|
||||
"//testing/gmock",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,6 @@ rtc_source_set("unittest") {
|
||||
"../../../../common_audio",
|
||||
"../../../../rtc_base:rtc_base_approved",
|
||||
"../../../../test:test_support",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
||||
|
@ -75,7 +75,6 @@ if (rtc_include_tests) {
|
||||
"../../test:test_support",
|
||||
"../pacing:mock_paced_sender",
|
||||
"../remote_bitrate_estimator:remote_bitrate_estimator",
|
||||
"//testing/gmock",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
|
@ -158,7 +158,6 @@ if (rtc_include_tests) {
|
||||
"../pacing:pacing",
|
||||
"../remote_bitrate_estimator:remote_bitrate_estimator",
|
||||
"../rtp_rtcp:rtp_rtcp_format",
|
||||
"//testing/gmock",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
|
@ -99,7 +99,6 @@ if (rtc_include_tests) {
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../system_wrappers:cpu_features_api",
|
||||
"../../test:test_support",
|
||||
"//testing/gmock",
|
||||
]
|
||||
if (rtc_desktop_capture_supported) {
|
||||
sources += [
|
||||
@ -146,7 +145,6 @@ if (rtc_include_tests) {
|
||||
|
||||
public_deps = [
|
||||
":desktop_capture",
|
||||
"//testing/gmock",
|
||||
]
|
||||
|
||||
sources = [
|
||||
|
@ -76,7 +76,6 @@ if (rtc_include_tests) {
|
||||
"../rtp_rtcp",
|
||||
"../rtp_rtcp:mock_rtp_rtcp",
|
||||
"../rtp_rtcp:rtp_rtcp_format",
|
||||
"//testing/gmock",
|
||||
]
|
||||
|
||||
# TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
|
||||
|
@ -156,7 +156,6 @@ if (rtc_include_tests) {
|
||||
"../rtp_rtcp",
|
||||
"../rtp_rtcp:rtp_rtcp_format",
|
||||
"../video_coding:video_coding_utility",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
||||
@ -213,7 +212,6 @@ if (rtc_include_tests) {
|
||||
"../../test:test_support",
|
||||
"../pacing:pacing",
|
||||
"../rtp_rtcp:rtp_rtcp_format",
|
||||
"//testing/gmock",
|
||||
]
|
||||
if (is_win) {
|
||||
cflags = [
|
||||
@ -239,7 +237,6 @@ if (rtc_include_tests) {
|
||||
"../..:webrtc_common",
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../test:test_main",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
data = [
|
||||
|
@ -417,7 +417,6 @@ if (rtc_include_tests) {
|
||||
"../../test:test_common",
|
||||
"../../test:test_support",
|
||||
"../audio_coding:audio_format_conversion",
|
||||
"//testing/gmock",
|
||||
]
|
||||
|
||||
# TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
|
||||
|
@ -68,7 +68,6 @@ if (rtc_include_tests) {
|
||||
"../../rtc_base:rtc_base_approved",
|
||||
"../../rtc_base:rtc_task_queue",
|
||||
"../../test:test_support",
|
||||
"//testing/gmock",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -703,7 +703,6 @@ if (rtc_include_tests) {
|
||||
"../../test:video_test_common",
|
||||
"../../test:video_test_support",
|
||||
"../rtp_rtcp:rtp_rtcp_format",
|
||||
"//testing/gmock",
|
||||
]
|
||||
if (rtc_build_libvpx) {
|
||||
deps += [ rtc_libvpx_dir ]
|
||||
|
@ -141,7 +141,6 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base:rtc_base_tests_utils",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
]
|
||||
}
|
||||
|
||||
@ -180,7 +179,6 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:rtc_base_tests_utils",
|
||||
"../rtc_base:stringutils",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
@ -221,7 +219,6 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base",
|
||||
"../rtc_base:rtc_base_tests_utils",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
defines = [ "GTEST_RELATIVE_PATH" ]
|
||||
|
@ -367,7 +367,6 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../rtc_base:rtc_base_tests_utils",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
]
|
||||
|
||||
if (!build_with_chromium && is_clang) {
|
||||
|
@ -880,7 +880,6 @@ rtc_source_set("rtc_base_tests_utils") {
|
||||
"../test:test_support",
|
||||
]
|
||||
public_deps = [
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
||||
@ -901,7 +900,6 @@ if (rtc_include_tests) {
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:rtc_base_tests_utils",
|
||||
"../rtc_base:rtc_json",
|
||||
"../system_wrappers:metrics_default",
|
||||
"//testing/gmock",
|
||||
]
|
||||
|
||||
if (is_android) {
|
||||
|
@ -164,7 +164,11 @@ rtc_source_set("test_support") {
|
||||
visibility = [ "*" ]
|
||||
testonly = true
|
||||
|
||||
all_dependent_configs = [ ":suppress_warning_4373" ]
|
||||
all_dependent_configs = [
|
||||
":suppress_warning_4373",
|
||||
"//third_party/googletest:gmock_config",
|
||||
"//third_party/googletest:gtest_config",
|
||||
]
|
||||
|
||||
sources = [
|
||||
"gmock.h",
|
||||
@ -226,7 +230,6 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../system_wrappers:metrics_default",
|
||||
"../system_wrappers:runtime_enabled_features_default",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
||||
@ -256,7 +259,6 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"../system_wrappers",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
"//third_party/libyuv",
|
||||
]
|
||||
@ -379,7 +381,6 @@ if (rtc_include_tests) {
|
||||
":video_test_support",
|
||||
"../modules/video_capture",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
||||
@ -483,7 +484,6 @@ rtc_source_set("fileutils_unittests") {
|
||||
"../api:optional",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
||||
@ -634,7 +634,6 @@ rtc_source_set("test_common") {
|
||||
"../system_wrappers:field_trial_api",
|
||||
"../system_wrappers:runtime_enabled_features_api",
|
||||
"../video",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
if (!is_android && !build_with_chromium) {
|
||||
@ -768,7 +767,6 @@ rtc_source_set("audio_codec_mocks") {
|
||||
"../api/audio_codecs:audio_codecs_api",
|
||||
"../api/audio_codecs:builtin_audio_decoder_factory",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"//testing/gmock",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,6 @@ if (rtc_include_tests) {
|
||||
"../test:test_common",
|
||||
"../test:test_renderer",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
@ -227,7 +226,6 @@ if (rtc_include_tests) {
|
||||
"../test:test_common",
|
||||
"../test:test_renderer",
|
||||
"../test:test_support",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
@ -342,7 +340,6 @@ if (rtc_include_tests) {
|
||||
"../test:test_common",
|
||||
"../test:test_support",
|
||||
"../test:video_test_common",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
]
|
||||
if (!build_with_chromium && is_clang) {
|
||||
|
Reference in New Issue
Block a user