blob: 9faf4c70226164e7b8c856e3f50229269f1a92fe [file] [log] [blame]
# Copyright 2019 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.
import("//build/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
go_library("botanist_lib") {
sources = [
"common.go",
"common_test.go",
"pkg.go",
"pkg_test.go",
]
deps = [
":constants",
"//src/sys/pkg/bin/pm:pm_lib",
"//third_party/golibs:cloud.google.com/go/storage",
"//tools/build",
"//tools/lib/gcsutil",
"//tools/lib/logger",
"//tools/lib/osmisc",
"//tools/lib/retry",
"//tools/lib/streams",
"//tools/lib/subprocess",
"//tools/net/netboot",
"//tools/net/tftp",
]
}
go_library("targets") {
source_dir = "targets"
sources = [
"aemu.go",
"aemu_test.go",
"device.go",
"device_test.go",
"errors.go",
"gce.go",
"gce_test.go",
"ip.go",
"qemu.go",
"target.go",
"target_test.go",
]
deps = [
":botanist_lib",
":constants",
"//src/sys/pkg/lib/repo",
"//third_party/golibs:github.com/creack/pty",
"//third_party/golibs:github.com/kr/pretty",
"//third_party/golibs:golang.org/x/crypto",
"//third_party/golibs:golang.org/x/sync",
"//tools/bootserver:bootserver_lib",
"//tools/lib/ffxutil",
"//tools/lib/iomisc",
"//tools/lib/logger",
"//tools/lib/osmisc",
"//tools/lib/retry",
"//tools/lib/serial",
"//tools/lib/serial:constants",
"//tools/lib/syslog",
"//tools/net/mdns",
"//tools/net/netutil",
"//tools/net/sshutil",
"//tools/qemu",
]
}
go_library("main") {
source_dir = "cmd"
sources = [
"main.go",
"run.go",
]
deps = [
":botanist_lib",
":constants",
":targets",
"//third_party/golibs:github.com/google/subcommands",
"//third_party/golibs:golang.org/x/sync",
"//tools/lib/color",
"//tools/lib/environment",
"//tools/lib/flagmisc",
"//tools/testing/runtests",
"//tools/testing/testrunner:constants",
]
}
go_binary("botanist") {
gopackage = "go.fuchsia.dev/fuchsia/tools/botanist/cmd"
deps = [ ":main" ]
}
go_test("botanist_lib_tests") {
gopackages = [ "go.fuchsia.dev/fuchsia/tools/botanist" ]
deps = [ ":botanist_lib" ]
}
go_test("botanist_targets_tests") {
gopackages = [ "go.fuchsia.dev/fuchsia/tools/botanist/targets" ]
deps = [ ":targets" ]
}
go_library("constants") {
source_dir = "constants"
sources = [ "constants.go" ]
}
group("tests") {
testonly = true
deps = [
":botanist_lib_tests",
":botanist_targets_tests",
]
}