| # 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 = "subprocess", | |
| srcs = [ | |
| "doc.go", | |
| "subprocess.go", | |
| ], | |
| importpath = "go.fuchsia.dev/fuchsia/tools/lib/subprocess", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| visibility = ["//visibility:public"], | |
| deps = [ | |
| "//tools/lib/clock", | |
| "//tools/lib/logger", | |
| ], | |
| ) | |
| host_go_test( | |
| name = "subprocess_tests", | |
| srcs = ["subprocess_test.go"], | |
| embed = [":subprocess"], | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| visibility = ["//tools:__pkg__"], | |
| deps = [ | |
| "//third_party/golibs:github.com/google/go-cmp/cmp", | |
| "//tools/lib/color", | |
| ], | |
| ) |