blob: e152cc77108ba7c3a54caec84d6ebf2c03d5e998 [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_fastboot_tool_args_test",
":ffx_fastboot_tool_test",
],
visibility = ["//src/developer/ffx:__pkg__"],
)
ffx_plugin(
name = "ffx_fastboot_tool",
srcs = ["src/lib.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/plugins/target:__pkg__"],
deps = [
"//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/flash_manifest:lib",
"//src/developer/ffx/lib/fastboot/interface:lib",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/ssh:lib",
"//src/developer/ffx/lib/target:lib",
"//src/developer/ffx/lib/writer:lib",
"//src/lib/assembly/partitions_config",
"//src/lib/assembly/product_bundle",
"//src/storage/lib/sparse/rust:lib",
"//third_party/rust_crates/vendor:anyhow",
"//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:tokio",
],
)
host_rustc_test(
name = "ffx_fastboot_tool_args_test",
crate = ":ffx_fastboot_tool_args",
)
host_rustc_test(
name = "ffx_fastboot_tool_test",
crate = ":ffx_fastboot_tool",
deps = [
"//src/developer/ffx/lib/futures:lib",
"//src/lib/fuchsia",
"//third_party/rust_crates/vendor:chrono",
"//third_party/rust_crates/vendor:serde_json",
"//third_party/rust_crates/vendor:tempfile",
],
)