blob: 01595b64b8746b9dbc8cf99d15fa36d008542c7e [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")
import("//build/testing/host_test_data.gni")
group("tests") {
testonly = true
deps = []
if (host_os == "linux") {
deps += [ ":limited_netsvc_tests($host_toolchain)" ]
}
}
if (is_linux) {
go_library("lib") {
testonly = true
deps = [ "//tools/emulator/emulatortest" ]
sources = [ "limited_netsvc_test.go" ]
}
net_tools = [
"netaddr",
"netcp",
"netls",
"netruncmd",
]
host_test_data("copy_netsvc_tools") {
visibility = [ ":*" ]
sources = []
outputs = [ "$root_out_dir/test_data/limited_netsvc/{{source_file_part}}" ]
deps = []
foreach(tool, net_tools) {
sources += [ "$root_out_dir/$tool" ]
deps += [ "//tools/netprotocol:$tool($host_toolchain)" ]
}
}
host_test_data("copy_loglistener") {
visibility = [ ":*" ]
sources = [ "$root_out_dir/loglistener" ]
outputs = [ "$root_out_dir/test_data/limited_netsvc/loglistener" ]
deps = [ "//tools/loglistener($host_toolchain)" ]
}
group("netsvc_user_tools") {
testonly = true
deps = [
":copy_loglistener",
":copy_netsvc_tools",
]
}
# TODO(scottmg): Colocate this test with netsvc when it moves out of //zircon.
go_test("limited_netsvc_tests") {
library = ":lib"
deps = [
"//tools/net/netutil",
"//tools/net/tftp",
"//tools/virtual_device:proto",
]
non_go_deps = [
":netsvc_user_tools",
"//build/images/fuchsia:fuchsia_zbi_for_host_tests",
]
}
}