Commit 1c098b88 authored by Mirko Bonadei's avatar Mirko Bonadei Committed by Commit Bot

Stop using all_dependent_configs in //third_party/googletest.

The usage of all_dependent_configs is considered a GN anti-pattern and
it should be used only when the public_deps/deps/public_configs/configs
system is not enough.

There is no real reason to use all_dependent_configs in
//third_party/googletest and since its usage has increased in
crrev.com/c/2090420, this CL addresses the problems and removes its
usage.


Bug: 1059240
Change-Id: I4ff2bd0a19ad2ddd0b25866fcf738ab2d05a523b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2091487
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747997}
parent 70c4831c
...@@ -159,12 +159,12 @@ static_library("test_support") { ...@@ -159,12 +159,12 @@ static_library("test_support") {
"//base", "//base",
"//base:base_static", "//base:base_static",
"//base:i18n", "//base:i18n",
"//testing/gmock",
"//testing/gtest",
] ]
deps = [ deps = [
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//testing/gmock",
"//testing/gtest",
"//third_party/icu:icuuc", "//third_party/icu:icuuc",
"//third_party/libxml:libxml_utils", "//third_party/libxml:libxml_utils",
"//third_party/libxml:xml_reader", "//third_party/libxml:xml_reader",
......
...@@ -156,6 +156,8 @@ source_set("test_support") { ...@@ -156,6 +156,8 @@ source_set("test_support") {
"test/exo_test_suite_aura.h", "test/exo_test_suite_aura.h",
] ]
public_deps = [ "//testing/gtest" ]
deps = [ deps = [
":exo", ":exo",
"//base", "//base",
...@@ -163,7 +165,6 @@ source_set("test_support") { ...@@ -163,7 +165,6 @@ source_set("test_support") {
"//components/viz/service", "//components/viz/service",
"//gpu", "//gpu",
"//skia", "//skia",
"//testing/gtest",
"//ui/aura", "//ui/aura",
"//ui/base/ime/init", "//ui/base/ime/init",
"//ui/compositor", "//ui/compositor",
......
...@@ -9,6 +9,7 @@ source_set("test") { ...@@ -9,6 +9,7 @@ source_set("test") {
public_deps = [ public_deps = [
":util", ":util",
"//ios/web/public/test/fakes", "//ios/web/public/test/fakes",
"//testing/gtest",
] ]
deps = [ deps = [
...@@ -21,7 +22,6 @@ source_set("test") { ...@@ -21,7 +22,6 @@ source_set("test") {
"//ios/web/navigation:wk_navigation_util", "//ios/web/navigation:wk_navigation_util",
"//ios/web/public/deprecated", "//ios/web/public/deprecated",
"//ios/web/test:test_support", "//ios/web/test:test_support",
"//testing/gtest",
"//ui/base", "//ui/base",
] ]
......
...@@ -48,6 +48,10 @@ source_set("test_support") { ...@@ -48,6 +48,10 @@ source_set("test_support") {
configs += [ "//build/config/compiler:enable_arc" ] configs += [ "//build/config/compiler:enable_arc" ]
testonly = true testonly = true
# This public_dep is a workaround because there is a circular dependency
# (this target should public_dep on //ios/web/public/test).
public_deps = [ "//testing/gtest" ]
deps = [ deps = [
":test_constants", ":test_constants",
"//base", "//base",
...@@ -61,7 +65,6 @@ source_set("test_support") { ...@@ -61,7 +65,6 @@ source_set("test_support") {
"//ios/web/public/test/http_server", "//ios/web/public/test/http_server",
"//ios/web/test/fakes", "//ios/web/test/fakes",
"//net", "//net",
"//testing/gtest",
"//third_party/ocmock", "//third_party/ocmock",
"//ui/base", "//ui/base",
] ]
......
...@@ -115,10 +115,9 @@ source_set("gtest") { ...@@ -115,10 +115,9 @@ source_set("gtest") {
# Some files include "src/gtest-internal-inl.h". # Some files include "src/gtest-internal-inl.h".
include_dirs = [ "src/googletest" ] include_dirs = [ "src/googletest" ]
# TODO(crbug.com/1059240): Remove usage of all_dependent_configs. public_configs = [ ":gtest_config" ]
all_dependent_configs = [ ":gtest_config" ]
if (!build_with_chromium && gtest_enable_absl_printers) { if (!build_with_chromium && gtest_enable_absl_printers) {
all_dependent_configs += [ "//third_party/abseil-cpp:absl_include_config" ] public_configs += [ "//third_party/abseil-cpp:absl_include_config" ]
} }
configs -= [ "//build/config/compiler:chromium_code" ] configs -= [ "//build/config/compiler:chromium_code" ]
......
...@@ -956,7 +956,6 @@ jumbo_source_set("test_support") { ...@@ -956,7 +956,6 @@ jumbo_source_set("test_support") {
"//ipc:test_support", "//ipc:test_support",
"//mojo/core/embedder", "//mojo/core/embedder",
"//skia", "//skia",
"//testing/gtest",
"//ui/base", "//ui/base",
"//ui/base:test_support", "//ui/base:test_support",
"//ui/base/clipboard:clipboard_test_support", "//ui/base/clipboard:clipboard_test_support",
...@@ -971,6 +970,7 @@ jumbo_source_set("test_support") { ...@@ -971,6 +970,7 @@ jumbo_source_set("test_support") {
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/gl:test_support", "//ui/gl:test_support",
] ]
public_deps = [ "//testing/gtest" ]
if (is_win) { if (is_win) {
sources += [ sources += [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment