| # 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("@platforms//host:constraints.bzl", "HOST_CONSTRAINTS") | |
| load("//build/bazel/rules/host:defs.bzl", "go_binary_host_tool") | |
| load("//build/bazel/rules/host_tests:host_go_test.bzl", "host_go_test") | |
| package(default_applicable_licenses = ["//:license"]) | |
| go_library( | |
| name = "lib", | |
| srcs = [ | |
| "api.go", | |
| "build.go", | |
| "command.go", | |
| "connector.go", | |
| "ffx_command.go", | |
| "fs_interface.go", | |
| "fuzzer.go", | |
| "handle.go", | |
| "instance.go", | |
| "launcher.go", | |
| "process.go", | |
| "utils.go", | |
| ], | |
| importpath = "go.fuchsia.dev/fuchsia/tools/fuzz", | |
| target_compatible_with = HOST_CONSTRAINTS, | |
| deps = [ | |
| "//third_party/golibs:github.com/golang/glog", | |
| "//third_party/golibs:github.com/kr/fs", | |
| "//third_party/golibs:github.com/pkg/sftp", | |
| "//third_party/golibs:golang.org/x/crypto/ssh", | |
| "//tools/qemu", | |
| ], | |
| ) | |
| go_binary_host_tool( | |
| name = "undercoat", | |
| srcs = [ | |
| "cmd/fuzz.go", | |
| ], | |
| target_compatible_with = HOST_CONSTRAINTS, | |
| visibility = ["//visibility:public"], | |
| deps = [ | |
| ":lib", | |
| "//third_party/golibs:github.com/golang/glog", | |
| ], | |
| ) | |
| host_go_test( | |
| name = "undercoat_tests", | |
| srcs = [ | |
| "api_test.go", | |
| "build_mock_test.go", | |
| "build_test.go", | |
| "command_mock_test.go", | |
| "connector_mock_test.go", | |
| "connector_test.go", | |
| "e2e_test.go", | |
| "ffx_fuzz_fake_test.go", | |
| "fuzzer_test.go", | |
| "handle_test.go", | |
| "instance_test.go", | |
| "launcher_mock_test.go", | |
| "launcher_test.go", | |
| "process_test.go", | |
| "ssh_fake_test.go", | |
| "test_utils_test.go", | |
| "utils_test.go", | |
| ], | |
| embed = [":lib"], | |
| target_compatible_with = HOST_CONSTRAINTS, | |
| visibility = ["//tools:__pkg__"], | |
| deps = [ | |
| "//third_party/golibs:github.com/golang/glog", | |
| "//third_party/golibs:github.com/google/go-cmp/cmp", | |
| "//third_party/golibs:github.com/google/go-cmp/cmp/cmpopts", | |
| "//third_party/golibs:github.com/kr/fs", | |
| "//third_party/golibs:github.com/pkg/sftp", | |
| "//third_party/golibs:golang.org/x/crypto/ssh", | |
| "//tools/qemu", | |
| ], | |
| ) |