| # 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("@io_bazel_rules_go//go:def.bzl", "go_library") | |
| load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS") | |
| load("//build/bazel/rules/host_tests:host_go_test.bzl", "host_go_test") | |
| package(default_applicable_licenses = ["//:license"]) | |
| go_library( | |
| name = "ffx", | |
| testonly = True, | |
| srcs = [ | |
| "ffx_daemon.go", | |
| "ffx_strict.go", | |
| "ffxtool.go", | |
| "flasher.go", | |
| ], | |
| importpath = "go.fuchsia.dev/fuchsia/src/testing/host-target-testing/ffx", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| visibility = ["//:__subpackages__"], | |
| deps = [ | |
| "//src/testing/host-target-testing/util", | |
| "//third_party/golibs:golang.org/x/crypto/ssh", | |
| "//tools/botanist:constants", | |
| "//tools/lib/ffxutil", | |
| "//tools/lib/logger", | |
| ], | |
| ) | |
| host_go_test( | |
| name = "host-target-testing-ffx-test", | |
| srcs = [ | |
| "ffx_test.go", | |
| "flasher_test.go", | |
| ], | |
| embed = [":ffx"], | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| visibility = ["//src/testing/host-target-testing:__pkg__"], | |
| deps = [ | |
| # GN bundles subpackages into //third_party/golibs:github.com/google/go-cmp; Bazel requires the :github.com/google/go-cmp/cmp subpackage target. | |
| "//third_party/golibs:github.com/google/go-cmp/cmp", # @bazel2gn:path_overwrite://third_party/golibs:github.com/google/go-cmp | |
| ], | |
| ) |