blob: e824fdf57fa20dd940d4dc57122d1dd59887e41a [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"])
test_suite(
name = "host_tests",
target_compatible_with = HOST_OS_CONSTRAINTS,
tests = [
":ffx_bootloader_args_test",
":ffx_bootloader_test",
],
visibility = ["//src/developer/ffx:__pkg__"],
)
ffx_plugin(
name = "ffx_bootloader",
srcs = ["src/lib.rs"],
args_deps = [
"//src/developer/ffx/core:lib",
"//src/developer/ffx/lib/fastboot/flash_manifest:lib",
"//third_party/rust_crates/vendor:argh",
],
args_srcs = ["src/args.rs"],
edition = "2024",
sdk_category = "not-yet-specified",
visibility = ["//src/developer/ffx/plugins/target:__pkg__"],
deps = [
"//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol_rust_fdomain",
"//sdk/fidl/fuchsia.hwinfo:fuchsia.hwinfo_rust_fdomain",
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/discovery:lib",
"//src/developer/ffx/lib/errors:lib",
"//src/developer/ffx/lib/fastboot:lib",
"//src/developer/ffx/lib/fastboot/connection_factory:lib",
"//src/developer/ffx/lib/fastboot/interface:lib",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/target:lib",
"//src/developer/ffx/lib/target/holders:lib",
"//src/developer/ffx/lib/writer:lib",
"//src/lib/fidl/rust/fidl",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:blocking",
"//third_party/rust_crates/vendor:chrono",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:log",
"//third_party/rust_crates/vendor:schemars",
"//third_party/rust_crates/vendor:serde",
"//third_party/rust_crates/vendor:termion",
"//third_party/rust_crates/vendor:tokio",
],
)
host_rustc_test(
name = "ffx_bootloader_args_test",
crate = ":ffx_bootloader_args",
)
host_rustc_test(
name = "ffx_bootloader_test",
crate = ":ffx_bootloader",
deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates/vendor:tempfile",
],
)