| # Copyright 2022 The Fuchsia Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| import("//build/components.gni") | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":cache_manager_tests_package" ] | |
| } | |
| fuchsia_package("cache_manager") { | |
| deps = [ ":cache_manager_component" ] | |
| } | |
| ## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ## | |
| # | |
| # ________ _________ ________ ________ | |
| # |\ ____\|\___ ___\\ __ \|\ __ \ | |
| # \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \ | |
| # \ \_____ \ \ \ \ \ \ \\\ \ \ ____\ | |
| # \|____|\ \ \ \ \ \ \ \\\ \ \ \___| | |
| # ____\_\ \ \ \__\ \ \_______\ \__\ | |
| # |\_________\ \|__| \|_______|\|__| | |
| # \|_________| | |
| # | |
| # | |
| # AUTO-GENERATED - DO NOT EDIT | |
| # | |
| # The targets below are auto-generated based on the targets defined in the | |
| # BUILD.bazel file from the same directory. If you made changes to targets in | |
| # Bazel, instead of editing this file manually, run: | |
| # | |
| # > fx bazel2gn | |
| # | |
| # Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and | |
| # rerun bazel2gn. | |
| import("//build/tools/bazel2gn/bazel_migration.gni") | |
| rustc_binary("bin") { | |
| sources = [ "src/main.rs" ] | |
| output_name = "cache_manager" | |
| edition = "2024" | |
| deps = [ | |
| ":cache_manager_config_lib", | |
| ":component_framework_cache_metrics_registry_rustlib", | |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", | |
| "//sdk/fidl/fuchsia.metrics:fuchsia.metrics_rust", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:log", | |
| ] | |
| } | |
| if (is_fuchsia) { | |
| rustc_test("cache_manager_bin_test") { | |
| sources = [ "src/main.rs" ] | |
| edition = "2024" | |
| deps = [ | |
| ":cache_manager_config_lib", | |
| ":component_framework_cache_metrics_registry_rustlib", | |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", | |
| "//sdk/fidl/fuchsia.metrics:fuchsia.metrics_rust", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:log", | |
| ] + [ "//third_party/rust_crates:futures" ] | |
| source_root = "src/main.rs" | |
| } | |
| } | |
| metrics_registry("component_framework_cache_metrics_registry") { | |
| generate_rust = true | |
| project_id = 21 | |
| } | |
| fuchsia_component_manifest("cache_manager_component_manifest") { | |
| component_name = "cache_manager" | |
| manifest = "meta/cache_manager.cml" | |
| } | |
| fuchsia_structured_config_rust_lib("cache_manager_config_lib") { | |
| cm_label = ":cache_manager_component_manifest" | |
| } | |
| fuchsia_component("cache_manager_component") { | |
| cm_label = ":cache_manager_component_manifest" | |
| deps = [ ":bin" ] | |
| } | |
| fuchsia_component_manifest("cache_manager_tests_manifest") { | |
| testonly = true | |
| component_name = "cache_manager_tests" | |
| manifest = "meta/cache_manager_tests.cml" | |
| } | |
| fuchsia_test_component("cache_manager_tests_component") { | |
| cm_label = ":cache_manager_tests_manifest" | |
| deps = [ ":cache_manager_bin_test" ] | |
| deps += [ "//src/cobalt/bin/testing/fake_cobalt" ] | |
| } | |
| fuchsia_test_package("cache_manager_tests_package") { | |
| package_name = "cache_manager_tests-gn" | |
| test_components = [ ":cache_manager_tests_component" ] | |
| } |