| # Copyright 2021 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. | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":component_debug_unittests-package" ] | |
| } | |
| ## 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") | |
| _COMMON_SRCS = [ | |
| "src/capability.rs", | |
| "src/cli/capability.rs", | |
| "src/cli/collection.rs", | |
| "src/cli/config.rs", | |
| "src/cli/create.rs", | |
| "src/cli/destroy.rs", | |
| "src/cli/doctor.rs", | |
| "src/cli/explore.rs", | |
| "src/cli/format.rs", | |
| "src/cli/graph.rs", | |
| "src/cli/list.rs", | |
| "src/cli/mod.rs", | |
| "src/cli/reload.rs", | |
| "src/cli/resolve.rs", | |
| "src/cli/route.rs", | |
| "src/cli/run.rs", | |
| "src/cli/show.rs", | |
| "src/cli/start.rs", | |
| "src/cli/stop.rs", | |
| "src/cli/storage.rs", | |
| "src/config.rs", | |
| "src/copy.rs", | |
| "src/dirs.rs", | |
| "src/doctor.rs", | |
| "src/explore.rs", | |
| "src/io.rs", | |
| "src/lib.rs", | |
| "src/lifecycle.rs", | |
| "src/path.rs", | |
| "src/query.rs", | |
| "src/realm.rs", | |
| "src/route.rs", | |
| "src/storage/copy.rs", | |
| "src/storage/delete.rs", | |
| "src/storage/delete_all.rs", | |
| "src/storage/list.rs", | |
| "src/storage/make_directory.rs", | |
| "src/storage/mod.rs", | |
| "src/test_utils.rs", | |
| ] | |
| # To avoid "Assignment had no effect" from GN. | |
| # It's possible this variable is only used in if conditions (e.g. is_host). | |
| not_needed([ "_COMMON_SRCS" ]) | |
| _COMMON_DEPS = [] | |
| _COMMON_DEPS += [ | |
| "//sdk/rust/zx-status", | |
| "//src/lib/directed_graph", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-url", | |
| "//src/sys/lib/cm_fidl_validator", | |
| "//src/sys/lib/cm_rust", | |
| "//src/sys/lib/cm_types", | |
| "//src/sys/lib/moniker", | |
| "//src/sys/lib/socket-to-stdio", | |
| "//third_party/rust_crates:prettytable-rs", | |
| "//third_party/rust_crates:ansi_term", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:regex-lite", | |
| "//third_party/rust_crates:serde_json", | |
| "//third_party/rust_crates:textwrap", | |
| "//third_party/rust_crates:thiserror", | |
| "//third_party/rust_crates:url", | |
| "//tools/lib/config_value_file", | |
| ] | |
| if (is_host) { | |
| _COMMON_DEPS += [ | |
| "//third_party/rust_crates:schemars", | |
| "//third_party/rust_crates:serde", | |
| ] | |
| } | |
| # To avoid "Assignment had no effect" from GN. | |
| # It's possible this variable is only used in if conditions (e.g. is_host). | |
| not_needed([ "_COMMON_DEPS" ]) | |
| rustc_library("component_debug") { | |
| sources = _COMMON_SRCS | |
| if (is_host) { | |
| features = [ "serde" ] | |
| } else { | |
| features = [] | |
| } | |
| edition = "2024" | |
| proc_macro_deps = [ "//third_party/rust_crates:async-trait" ] | |
| assert_no_deps = [ | |
| "//sdk/fidl/fuchsia.component.internal:fuchsia.component.internal_rust", | |
| "//src/sys/lib/routing", | |
| ] | |
| visibility = [ | |
| ":*", | |
| "//src/connectivity/*", | |
| "//src/developer/*", | |
| "//src/diagnostics/*", | |
| "//src/session/*", | |
| "//src/storage/*", | |
| "//src/sys/*", | |
| "//src/testing/sl4f:*", | |
| ] | |
| deps = _COMMON_DEPS + [ | |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust_flex", | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust_flex", | |
| "//sdk/fidl/fuchsia.dash:fuchsia.dash_rust_flex", | |
| "//sdk/fidl/fuchsia.data:fuchsia.data_rust_flex", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust_flex", | |
| "//sdk/fidl/fuchsia.process:fuchsia.process_rust_flex", | |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust_flex", | |
| "//src/lib/fdomain/client:flex_fidl", | |
| "//src/lib/fuchsia-fs", | |
| ] | |
| } | |
| rustc_library("component_debug_fdomain") { | |
| sources = _COMMON_SRCS | |
| features = [] | |
| features += [ "fdomain" ] | |
| if (is_host) { | |
| features += [ "serde" ] | |
| } | |
| edition = "2024" | |
| proc_macro_deps = [ "//third_party/rust_crates:async-trait" ] | |
| assert_no_deps = [ | |
| "//sdk/fidl/fuchsia.component.internal:fuchsia.component.internal_rust", | |
| "//src/sys/lib/routing", | |
| ] | |
| visibility = [ | |
| ":*", | |
| "//src/developer/ffx/*", | |
| "//src/diagnostics/iquery:*", | |
| "//src/diagnostics/lib/log-command:*", | |
| "//src/sys/run_test_suite:*", | |
| ] | |
| deps = _COMMON_DEPS + [ | |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust_fdomain_flex", | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust_fdomain_flex", | |
| "//sdk/fidl/fuchsia.dash:fuchsia.dash_rust_fdomain_flex", | |
| "//sdk/fidl/fuchsia.data:fuchsia.data_rust_fdomain_flex", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust_fdomain_flex", | |
| "//sdk/fidl/fuchsia.process:fuchsia.process_rust_fdomain_flex", | |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust_fdomain_flex", | |
| "//src/lib/fdomain/client:flex_fdomain", | |
| "//src/lib/fuchsia-fs:fuchsia-fs_fdomain", | |
| ] | |
| } | |
| if (is_fuchsia) { | |
| rustc_test("component_debug_test") { | |
| sources = _COMMON_SRCS | |
| edition = "2024" | |
| proc_macro_deps = [ "//third_party/rust_crates:async-trait" ] | |
| deps = | |
| _COMMON_DEPS + [ | |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust_flex", | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust_flex", | |
| "//sdk/fidl/fuchsia.dash:fuchsia.dash_rust_flex", | |
| "//sdk/fidl/fuchsia.data:fuchsia.data_rust_flex", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust_flex", | |
| "//sdk/fidl/fuchsia.process:fuchsia.process_rust_flex", | |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust_flex", | |
| "//src/lib/fdomain/client:flex_fidl", | |
| "//src/lib/fuchsia-fs", | |
| ] + | |
| [ | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", | |
| "//src/lib/fdio/rust:fdio", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia", | |
| "//src/sys/lib/cm_rust/testing", | |
| "//third_party/rust_crates:assert_matches", | |
| "//third_party/rust_crates:pretty_assertions", | |
| "//third_party/rust_crates:tempfile", | |
| "//third_party/rust_crates:test-case", | |
| ] | |
| if (is_host) { | |
| features = [ "serde" ] | |
| } else { | |
| features = [] | |
| } | |
| output_name = "component_debug_lib_test" | |
| } | |
| } | |
| fuchsia_component_manifest("component_debug_unittests-manifest") { | |
| testonly = true | |
| component_name = "component_debug_unittests" | |
| manifest = "meta/unittests.cml" | |
| } | |
| fuchsia_test_component("component_debug_unittests-component") { | |
| cm_label = ":component_debug_unittests-manifest" | |
| deps = [ ":component_debug_test" ] | |
| } | |
| fuchsia_test_package("component_debug_unittests-package") { | |
| package_name = "component_debug_unittests-gn" | |
| test_components = [ ":component_debug_unittests-component" ] | |
| } |