blob: 23716f331bc83ae3cb682e120bdb0dc7d4df6487 [file]
# 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("//src/developer/ffx/build:ffx_plugin.bzl", "ffx_plugin")
package(default_applicable_licenses = ["//:license"])
# GN keeps its hand-written group("tests") above the sentinel.
# @bazel2gn:skip
test_suite(
name = "host_tests",
target_compatible_with = HOST_OS_CONSTRAINTS,
tests = [":ffx_doctor_test"],
visibility = ["//src/developer/ffx:__pkg__"],
)
ffx_plugin(
name = "ffx_doctor",
srcs = [
"src/doctor_ledger.rs",
"src/environment.rs",
"src/gcheck.rs",
"src/ledger_view.rs",
"src/lib.rs",
"src/network.rs",
"src/record.rs",
"src/single_target_diagnostics.rs",
# Gated by #[cfg(target_os = "linux")] in src/lib.rs; ffx_plugin.srcs is non-configurable.
"src/ssh_agent.rs",
"src/target.rs",
"src/types.rs",
"src/usb.rs",
],
args_deps = [
"//src/developer/ffx/core:lib",
"//third_party/rust_crates/vendor:argh",
],
args_srcs = ["src/args.rs"],
edition = "2024",
sdk_category = "not-yet-specified",
version = "0.1.0",
visibility = ["//src/developer/ffx/frontends/ffx:__pkg__"],
deps = [
"//src/developer/ffx/command:lib",
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/diagnostics:lib",
"//src/developer/ffx/lib/diagnostics/checks:lib",
"//src/developer/ffx/lib/discovery:lib",
"//src/developer/ffx/lib/doctor_utils:lib",
"//src/developer/ffx/lib/emulator_instance:lib",
"//src/developer/ffx/lib/errors:lib",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/ssh:lib",
"//src/developer/ffx/lib/target:lib",
"//src/developer/ffx/lib/termio",
"//src/developer/ffx/lib/timeout:lib",
"//src/developer/ffx/lib/usb_driver_api:lib",
"//src/developer/ffx/lib/version:lib",
"//src/developer/ffx/lib/writer:lib",
"//src/developer/ffx/plugins/target/show:ffx_target_show",
"//src/developer/ffx/plugins/target/show:ffx_target_show_args",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-lockfile:lib",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:async-lock",
"//third_party/rust_crates/vendor:log",
"//third_party/rust_crates/vendor:mockall",
"//third_party/rust_crates/vendor:nix",
"//third_party/rust_crates/vendor:regex",
"//third_party/rust_crates/vendor:schemars",
"//third_party/rust_crates/vendor:serde",
"//third_party/rust_crates/vendor:serde_json",
"//third_party/rust_crates/vendor:thiserror",
"//third_party/rust_crates/vendor:tokio",
"//third_party/rust_crates/vendor:zip",
],
)
host_rustc_test(
name = "ffx_doctor_test",
crate = ":ffx_doctor",
deps = [
"//src/developer/ffx/plugins/doctor/test_utils:lib",
"//src/lib/fuchsia",
"//third_party/rust_crates/vendor:tempfile",
],
)