| # 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 = [], | |
| visibility = ["//src/developer/ffx:__pkg__"], | |
| ) | |
| ffx_plugin( | |
| name = "ffx_update", | |
| srcs = [ | |
| "src/lib.rs", | |
| "src/server.rs", | |
| ], | |
| args_deps = [ | |
| "//src/developer/ffx/config:lib", | |
| "//src/developer/ffx/core:lib", | |
| "//third_party/rust_crates/vendor:argh", | |
| "//third_party/rust_crates/vendor:camino", | |
| ], | |
| args_srcs = ["src/args.rs"], | |
| edition = "2024", | |
| sdk_category = "not-yet-specified", | |
| version = "0.1.0", | |
| visibility = ["//src/developer/ffx/plugins/target:__pkg__"], | |
| deps = [ | |
| "//sdk/fidl/fuchsia.buildinfo:fuchsia.buildinfo_rust_fdomain", | |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust_fdomain", | |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite_rust_fdomain", | |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust_fdomain", | |
| "//sdk/fidl/fuchsia.update.channel:fuchsia.update.channel_rust_fdomain", | |
| "//sdk/fidl/fuchsia.update.channelcontrol:fuchsia.update.channelcontrol_rust_fdomain", | |
| "//sdk/fidl/fuchsia.update:fuchsia.update_rust_fdomain", | |
| "//sdk/rust/zx-status", | |
| "//src/developer/ffx/config:lib", | |
| "//src/developer/ffx/lib/errors:lib", | |
| "//src/developer/ffx/lib/fho:lib", | |
| "//src/developer/ffx/lib/futures:lib", | |
| "//src/developer/ffx/lib/pkg:pkg_fdomain", | |
| "//src/developer/ffx/lib/ssh:lib", | |
| "//src/developer/ffx/lib/target/connector:lib", | |
| "//src/developer/ffx/lib/target/holders:lib", | |
| "//src/developer/ffx/lib/timeout:lib", | |
| "//src/developer/ffx/lib/writer:lib", | |
| "//src/developer/ffx/plugins/repository/server/start:ffx_repository_server_start", | |
| "//src/developer/ffx/plugins/repository/server/start:ffx_repository_server_start_args", | |
| "//src/lib/assembly/product_bundle", | |
| "//src/lib/fdomain/client", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-async", | |
| "//src/sys/lib/fidl-fuchsia-pkg-ext", | |
| "//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext:fidl-fuchsia-pkg-rewrite-ext_fdomain", | |
| "//src/sys/pkg/fidl/fuchsia.update.installer:fuchsia.update.installer_rust_fdomain", | |
| "//src/sys/pkg/lib/fidl-fuchsia-update-ext", | |
| "//src/sys/pkg/lib/fidl-fuchsia-update-installer-ext", | |
| "//third_party/rust_crates/vendor:camino", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:http", | |
| "//third_party/rust_crates/vendor:log", | |
| "//third_party/rust_crates/vendor:termion", | |
| "//third_party/rust_crates/vendor:thiserror", | |
| ], | |
| ) | |
| host_rustc_test( | |
| name = "ffx_update_args_test", | |
| crate = ":ffx_update_args", | |
| deps = ["//third_party/rust_crates/vendor:assert_matches"], | |
| ) | |
| # src/lib.rs calls fuchsia_repo::test_utils::make_repo_dir, which reads | |
| # ./test_data/ffx_lib_pkg/empty-repo/{keys,repository} at runtime. | |
| # bazel2gn cannot translate `test_data`, so this test is marked @bazel2gn:skip | |
| # and wired into //src/developer/ffx:tests in Bazel. | |
| # @bazel2gn:skip | |
| host_rustc_test( | |
| name = "ffx_update_test", | |
| crate = ":ffx_update", | |
| test_data = [ | |
| "//src/developer/ffx/lib/pkg:empty-repo-keys", | |
| "//src/developer/ffx/lib/pkg:empty-repo-metadata", | |
| ], | |
| deps = [ | |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", | |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust", | |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite_rust", | |
| "//src/developer/ffx/lib/target:lib", | |
| "//src/developer/ffx/lib/target/behavior:lib", | |
| "//src/lib/assembly/partitions_config", | |
| "//src/lib/assembly/release_info", | |
| "//src/lib/fdomain/client", | |
| "//src/lib/fdomain/local", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-hyper", | |
| "//src/lib/fuchsia-url", | |
| "//src/sys/pkg/lib/fuchsia-repo", | |
| "//src/sys/pkg/testing/mock-installer:mock-installer_fdomain", | |
| "//third_party/rust_crates/vendor:assert_matches", | |
| "//third_party/rust_crates/vendor:http-body-util", | |
| "//third_party/rust_crates/vendor:hyper", | |
| "//third_party/rust_crates/vendor:tempfile", | |
| ], | |
| ) |