blob: 6761cc8351f8129cdd16e25f3fc987ad6d837e55 [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_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",
]
# Each test spins up a new QEMU instance which on ASAN builds takes a
# decent chunk of time, so the 5-minute default isn't enough.
#
# It looks like it takes a little over 1 minute to get into Zedboot on
# the test bots, so 2 minutes per test is probably safe.
timeout = "12m"
}
}