| # Copyright 2023 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/runtime_capabilities:runtime_capabilities-unittests" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| ":bazel_tests", | |
| ":runtime_capabilities-unittests", | |
| ] | |
| } | |
| ## 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("runtime_capabilities") { | |
| sources = [] | |
| sources += [ | |
| "src/capability.rs", | |
| "src/connector.rs", | |
| "src/data.rs", | |
| "src/dictionary.rs", | |
| "src/dir_connector.rs", | |
| "src/fidl/capability.rs", | |
| "src/fidl/connector.rs", | |
| "src/fidl/connector_router.rs", | |
| "src/fidl/data.rs", | |
| "src/fidl/data_router.rs", | |
| "src/fidl/dictionary.rs", | |
| "src/fidl/dictionary_router.rs", | |
| "src/fidl/dir_connector.rs", | |
| "src/fidl/dir_connector_router.rs", | |
| "src/fidl/handle.rs", | |
| "src/fidl/instance_token.rs", | |
| "src/fidl/mod.rs", | |
| "src/fidl/receiver.rs", | |
| "src/fidl/router.rs", | |
| "src/fidl/store.rs", | |
| "src/handle.rs", | |
| "src/instance_token.rs", | |
| "src/lib.rs", | |
| "src/receiver.rs", | |
| "src/router.rs", | |
| ] | |
| if (is_fuchsia) { | |
| sources += [ "src/fidl/registry.rs" ] | |
| } | |
| edition = "2024" | |
| proc_macro_deps = [ | |
| "//third_party/rust_crates:async-trait", | |
| "//third_party/rust_crates:derivative", | |
| ] | |
| visibility = [ | |
| ":*", | |
| "//src/security/lib/scrutiny/frontend:*", | |
| "//src/sys/component_manager/*", | |
| "//src/sys/lib/routing:*", | |
| "//tools/lib/cm_fidl_analyzer/*", | |
| ] | |
| deps = [] | |
| deps += [ | |
| "//sdk/fidl/fuchsia.component.runtime:fuchsia.component.runtime_rust", | |
| "//sdk/fidl/fuchsia.component.sandbox:fuchsia.component.sandbox_rust", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", | |
| "//sdk/rust/zx-status", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/from-enum", | |
| "//src/lib/fuchsia-sync", | |
| "//src/sys/component_manager/lib/router_error", | |
| "//src/sys/lib/capability_source", | |
| "//src/sys/lib/cm_rust", | |
| "//src/sys/lib/cm_types", | |
| "//third_party/rust_crates:flyweights", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:itertools", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| if (is_fuchsia) { | |
| deps += [ | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", | |
| "//sdk/rust/zx", | |
| "//src/lib/fuchsia-async", | |
| "//src/storage/lib/vfs/rust:vfs", | |
| "//third_party/rust_crates:log", | |
| "//third_party/rust_crates:scopeguard", | |
| ] | |
| } | |
| } | |
| rustc_test("runtime_capabilities_test") { | |
| sources = [] | |
| sources += [ | |
| "src/capability.rs", | |
| "src/connector.rs", | |
| "src/data.rs", | |
| "src/dictionary.rs", | |
| "src/dir_connector.rs", | |
| "src/fidl/capability.rs", | |
| "src/fidl/connector.rs", | |
| "src/fidl/connector_router.rs", | |
| "src/fidl/data.rs", | |
| "src/fidl/data_router.rs", | |
| "src/fidl/dictionary.rs", | |
| "src/fidl/dictionary_router.rs", | |
| "src/fidl/dir_connector.rs", | |
| "src/fidl/dir_connector_router.rs", | |
| "src/fidl/handle.rs", | |
| "src/fidl/instance_token.rs", | |
| "src/fidl/mod.rs", | |
| "src/fidl/receiver.rs", | |
| "src/fidl/router.rs", | |
| "src/fidl/store.rs", | |
| "src/handle.rs", | |
| "src/instance_token.rs", | |
| "src/lib.rs", | |
| "src/receiver.rs", | |
| "src/router.rs", | |
| ] | |
| if (is_fuchsia) { | |
| sources += [ "src/fidl/registry.rs" ] | |
| } | |
| edition = "2024" | |
| proc_macro_deps = [ | |
| "//third_party/rust_crates:async-trait", | |
| "//third_party/rust_crates:derivative", | |
| ] | |
| deps = [] | |
| deps += [ | |
| "//sdk/fidl/fuchsia.component.runtime:fuchsia.component.runtime_rust", | |
| "//sdk/fidl/fuchsia.component.sandbox:fuchsia.component.sandbox_rust", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", | |
| "//sdk/rust/zx-status", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/from-enum", | |
| "//src/lib/fuchsia-sync", | |
| "//src/sys/component_manager/lib/router_error", | |
| "//src/sys/lib/capability_source", | |
| "//src/sys/lib/cm_rust", | |
| "//src/sys/lib/cm_types", | |
| "//third_party/rust_crates:flyweights", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:itertools", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| if (is_fuchsia) { | |
| deps += [ | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", | |
| "//sdk/rust/zx", | |
| "//src/lib/fuchsia-async", | |
| "//src/storage/lib/vfs/rust:vfs", | |
| "//third_party/rust_crates:log", | |
| "//third_party/rust_crates:scopeguard", | |
| ] | |
| } | |
| deps += [ | |
| "//src/lib/fdio/rust:fdio", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-fs", | |
| "//src/lib/sandbox", | |
| "//src/lib/test_util", | |
| "//third_party/rust_crates:assert_matches", | |
| "//third_party/rust_crates:test-case", | |
| ] | |
| } | |
| fuchsia_unittest_package("runtime_capabilities-unittests") { | |
| package_name = "runtime_capabilities-unittests-gn" | |
| component_name = "runtime_capabilities-unittests" | |
| deps = [ ":runtime_capabilities_test" ] | |
| } |