Skip to content

Commit

Permalink
Cherry pick PR #548: Requisite ukm changes to get it building (#728)
Browse files Browse the repository at this point in the history
* Requisite ukm changes to get it building (#548)

Some necessary modifications to the UKM BUILD file to
get it building as a dependency

b/280094891

Change-Id: I8389265d918aed47fae7a6e89492cc6f4bcaade6
(cherry picked from commit 41f7864)

Co-authored-by: Joel Martinez <[email protected]>
Co-authored-by: Joel Martinez <[email protected]>
  • Loading branch information
3 people committed Jun 27, 2023
1 parent b9017a9 commit 47f0926
Showing 1 changed file with 45 additions and 34 deletions.
79 changes: 45 additions & 34 deletions components/ukm/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ static_library("ukm") {
"//components/variations",
"//url",
]

if (use_cobalt_customizations) {
public_deps -= [
"//services/metrics/public/cpp:metrics_cpp",
"//services/metrics/public/cpp:ukm_builders",
"//services/metrics/public/mojom",
]
}
}

# Helper library for observing signals that we need to clear any local data.
Expand Down Expand Up @@ -79,40 +87,43 @@ static_library("test_support") {
]
}

source_set("unit_tests") {
testonly = true
sources = [
"observers/sync_disable_observer_unittest.cc",
"ukm_service_unittest.cc",
]
# TODO(b/283275474): Re-enable as many tests as possible.
if (!use_cobalt_customizations) {
source_set("unit_tests") {
testonly = true
sources = [
"observers/sync_disable_observer_unittest.cc",
"ukm_service_unittest.cc",
]

deps = [
":observers",
":test_support",
":ukm",
"//base",
"//base/test:test_support",
"//components/metrics",
"//components/metrics:test_support",
"//components/prefs:test_support",
"//components/sync",
"//components/sync:test_support_driver",
"//components/sync_preferences:test_support",
"//components/variations",
"//net:test_support",
"//services/metrics/public/cpp:ukm_builders",
"//testing/gtest",
"//third_party/zlib/google:compression_utils",
"//url",
]
}
deps = [
":observers",
":test_support",
":ukm",
"//base",
"//base/test:test_support",
"//components/metrics",
"//components/metrics:test_support",
"//components/prefs:test_support",
"//components/sync",
"//components/sync:test_support_driver",
"//components/sync_preferences:test_support",
"//components/variations",
"//net:test_support",
"//services/metrics/public/cpp:ukm_builders",
"//testing/gtest",
"//third_party/zlib/google:compression_utils",
"//url",
]
}

# Convenience testing target
test("ukm_unittests") {
deps = [
":unit_tests",
"//base",
"//base/test:test_support",
"//components/test:run_all_unittests",
]
# Convenience testing target
test("ukm_unittests") {
deps = [
":unit_tests",
"//base",
"//base/test:test_support",
"//components/test:run_all_unittests",
]
}
}

0 comments on commit 47f0926

Please sign in to comment.