| # 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. | |
| load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS") | |
| load("//build/bazel/rules/host_tests:host_rustc_test.bzl", "host_rustc_test") | |
| load("//build/bazel/rules/rust:rustc_library.bzl", "rustc_library") | |
| package(default_applicable_licenses = ["//:license"]) | |
| rustc_library( | |
| name = "lib", | |
| srcs = [ | |
| "src/fake_rcs.rs", | |
| "src/lib.rs", | |
| ], | |
| crate_name = "testing_lib", | |
| edition = "2024", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| visibility = [ | |
| "//src/developer/ffx/plugins/component:__subpackages__", | |
| "//src/developer/ffx/plugins/inspect:__subpackages__", | |
| "//src/developer/ffx/plugins/log:__subpackages__", | |
| "//src/developer/ffx/plugins/target:__subpackages__", | |
| "//src/developer/ffx/plugins/test:__subpackages__", | |
| ], | |
| deps = [ | |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust_fdomain", | |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust_fdomain_flex", | |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_rust_fdomain_flex", | |
| "//src/developer/ffx/lib/rcs:lib", | |
| "//src/developer/ffx/lib/target/holders:lib", | |
| "//src/diagnostics/iquery/test_support:iquery_test_support", | |
| "//src/lib/fdomain/client", | |
| "//src/lib/fuchsia-async", | |
| ], | |
| ) | |
| host_rustc_test( | |
| name = "lib_test", | |
| crate = ":lib", | |
| # Only used by bazel2gn to set GN output_name and avoid host_x64/lib_test collisions. | |
| crate_name = "testing_lib_lib_test", | |
| visibility = ["//src/developer/ffx:__pkg__"], | |
| ) |