blob: 379814b3822431102afe24fd32b06d0fcb715ba0 [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("@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 = "lib",
srcs = [
"lib.go",
"nsjail.go",
"outputs.go",
"tester.go",
],
importpath = "go.fuchsia.dev/fuchsia/tools/testing/testrunner",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//:__subpackages__"],
deps = [
":constants",
"//third_party/golibs:github.com/pkg/sftp",
"//third_party/golibs:golang.org/x/crypto/ssh",
"//tools/botanist:botanist_lib",
"//tools/botanist:constants",
"//tools/botanist:targets",
"//tools/build",
"//tools/debug/covargs:covargs_lib",
"//tools/debug/elflib",
"//tools/integration/testsharder:testsharder_lib",
"//tools/lib/clock",
"//tools/lib/environment",
"//tools/lib/ffxutil",
"//tools/lib/ffxutil:constants",
"//tools/lib/iomisc",
"//tools/lib/logger",
"//tools/lib/osmisc",
"//tools/lib/retry",
"//tools/lib/serial",
"//tools/lib/streams",
"//tools/lib/subprocess",
"//tools/net/sshutil:constants",
"//tools/testing/runtests",
"//tools/testing/tap",
"//tools/testing/testparser",
],
)
go_library(
name = "constants",
srcs = [
"constants/constants.go",
],
importpath = "go.fuchsia.dev/fuchsia/tools/testing/testrunner/constants",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//:__subpackages__"],
)
host_go_test(
name = "testrunner_lib_tests",
srcs = [
"lib_test.go",
"nsjail_test.go",
"outputs_test.go",
"tester_test.go",
],
embed = [":lib"],
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//:__subpackages__"],
deps = [
"//third_party/golibs:github.com/google/go-cmp/cmp",
"//third_party/golibs:github.com/google/go-cmp/cmp/cmpopts",
"//tools/botanist:botanist_lib",
"//tools/botanist:constants",
"//tools/botanist:targets",
"//tools/build",
"//tools/integration/testsharder:metadata",
"//tools/integration/testsharder:testsharder_lib",
"//tools/lib/ffxutil",
"//tools/lib/ffxutil:constants",
"//tools/lib/iomisc",
"//tools/lib/osmisc",
"//tools/lib/retry",
"//tools/lib/subprocess",
"//tools/net/sshutil:constants",
"//tools/testing/runtests",
"//tools/testing/tap",
],
)