| # Copyright 2026 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/bazel/bazel_test_suite.gni") | |
| bazel_test_suite("bazel_tests") { | |
| target_tests = [ "//src/sys/lib/capability_source:capability_source_tests" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| ":bazel_tests", | |
| ":capability_source_tests", | |
| ] | |
| } | |
| ## 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_library("capability_source") { | |
| sources = [ "src/lib.rs" ] | |
| if (is_host) { | |
| features = [ "serde" ] | |
| } else { | |
| features = [] | |
| } | |
| edition = "2024" | |
| visibility = [ | |
| ":*", | |
| "//src/security/lib/scrutiny/frontend:*", | |
| "//src/sys/component_manager:*", | |
| "//src/sys/lib/routing/*", | |
| "//src/sys/lib/runtime_capabilities:*", | |
| "//tools/lib/cm_fidl_analyzer/*", | |
| ] | |
| deps = [] | |
| deps += [ | |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", | |
| "//src/lib/from-enum", | |
| "//src/sys/lib/cm_rust", | |
| "//src/sys/lib/cm_types", | |
| "//src/sys/lib/moniker", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| if (is_host) { | |
| deps += [ "//third_party/rust_crates:serde" ] | |
| } | |
| } | |
| rustc_test("capability_source_test") { | |
| sources = [ "src/lib.rs" ] | |
| edition = "2024" | |
| deps = [] | |
| deps += [ | |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", | |
| "//src/lib/from-enum", | |
| "//src/sys/lib/cm_rust", | |
| "//src/sys/lib/cm_types", | |
| "//src/sys/lib/moniker", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| if (is_host) { | |
| deps += [ "//third_party/rust_crates:serde" ] | |
| } | |
| deps += [ "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust" ] | |
| if (is_host) { | |
| features = [ "serde" ] | |
| } else { | |
| features = [] | |
| } | |
| } | |
| fuchsia_unittest_package("capability_source_tests") { | |
| package_name = "capability_source_tests-gn" | |
| component_name = "capability_source_tests" | |
| deps = [ ":capability_source_test" ] | |
| } |