Skip to content

Commit

Permalink
Requisite ukm changes to get it building (#548)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
joeltine authored and anonymous1-me committed Jun 27, 2023
1 parent ae9b314 commit 23154dc
Showing 1 changed file with 48 additions and 35 deletions.
83 changes: 48 additions & 35 deletions components/ukm/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//testing/test.gni")
if (!use_cobalt_customizations) {
import("//testing/test.gni")
}

# The Url-Keyed Metrics (UKM) service is responsible for gathering and
# uploading reports that contain fine grained performance metrics including
Expand Down Expand Up @@ -38,6 +40,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 +89,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 23154dc

Please sign in to comment.