Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requisite ukm changes to get it building #548

Merged
merged 1 commit into from
Jun 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
joeltine marked this conversation as resolved.
Show resolved Hide resolved
}

# 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",
]
}
}