blob: da879e95cdd6bea90abdafb96e71c933f57ddb6b [file] [log] [blame] [edit]
# Copyright 2016 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_test.gni")
import("//build/package.gni")
package("netstack") {
deps = [
":netstack_bin",
]
binary = "netstack"
meta = [ {
path = rebase_path("meta/sandbox")
dest = "sandbox"
} ]
}
package("netstack_tools") {
system_image = true
deps = [
"ifconfig",
"ifinfo",
"netstack_service_test",
"netstat",
"//garnet/public/lib/netstack/fidl",
]
binaries = [
{
name = "ifconfig"
},
{
name = "ifinfo"
},
{
name = "netstack_service_test"
},
{
name = "netstat"
},
]
}
package("netstack_gotests") {
testonly = true
system_image = true
deps = [
":netstack_netiface_test",
"//garnet/go/src/netstack/netstat:netstack_netstat_test",
]
tests = [
{
name = "netstack_netiface_test"
},
{
name = "netstack_netstat_test"
},
]
}
go_binary("netstack_bin") {
output_name = "netstack"
gopackage = "netstack"
go_dependencies = [
{
package = "netstack"
source = "//garnet/go/src/netstack"
},
{
package = "app"
source = "//garnet/public/lib/app/go/src/app"
},
{
package = "svc"
source = "//garnet/public/lib/svc/go/src/svc"
},
{
package = "fidl"
source = "//garnet/public/lib/fidl/go/src/fidl"
},
{
package = "github.com/google/netstack"
source = "//third_party/netstack"
},
{
package = "garnet/public/lib/netstack/fidl"
source = "$root_gen_dir/go/src/garnet/public/lib/netstack/fidl"
},
{
package = "garnet/public/lib/app/fidl"
source = "$root_gen_dir/go/src/garnet/public/lib/app/fidl"
},
]
deps = [
"//garnet/public/lib/app/fidl",
"//garnet/public/lib/netstack/fidl",
]
}
go_test("netstack_netiface_test") {
gopackage = "netstack/netiface"
go_dependencies = [
{
package = "netstack"
source = "//garnet/go/src/netstack"
},
{
package = "github.com/google/netstack"
source = "//third_party/netstack"
},
]
}