blob: 921f19fcc817e5e88f55c59574d755c6a4b0ce78 [file]
# 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_library.gni")
import("//build/go/go_test.gni")
group("tests") {
testonly = true
deps = []
if (host_os == "linux") {
deps += [ ":bootserver_tests($host_toolchain)" ]
}
}
if (is_linux) {
go_library("lib") {
testonly = true
name = "fuchsia.googlesource.com/tests/bootserver"
deps = [ "//src/testing/qemu" ]
}
group("main_zbi") {
metadata = {
test_runtime_deps = [ "$root_build_dir/fuchsia.zbi" ]
}
}
copy("copy_bootserver_tools") {
visibility = [ ":*" ]
sources = [
"$zircon_root_build_dir/tools/bootserver",
"$zircon_root_build_dir/tools/netls",
]
outputs = [ "$root_out_dir/test_data/bootserver_tools/{{source_file_part}}" ]
}
group("bootserver_user_tools") {
deps = [ ":copy_bootserver_tools" ]
metadata = {
test_runtime_deps = [
"$root_out_dir/test_data/bootserver_tools/bootserver",
"$root_out_dir/test_data/bootserver_tools/netls",
]
}
}
# TODO(scottmg): Colocate this test with bootserver/netsvc when it moves out of //zircon.
go_test("bootserver_tests") {
gopackages = [ "fuchsia.googlesource.com/tests/bootserver" ]
deps = [
":lib",
"//tools/net/netutil",
"//tools/net/tftp",
]
non_go_deps = [
":main_zbi",
":bootserver_user_tools",
]
}
}