| # 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_library.gni") |
| import("//build/go/go_test.gni") |
| import("//build/go/toolchain.gni") |
| import("//build/package.gni") |
| |
| package("netstack") { |
| deps = [ |
| "//garnet/go/src/grand_unified_binary", |
| ] |
| |
| binaries = [ |
| { |
| name = "netstack" |
| source = "grand_unified_binary" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/netstack.cmx") |
| dest = "netstack.cmx" |
| }, |
| { |
| path = rebase_path("//garnet/bin/appmgr/legacy_flat_exported_dir") |
| dest = "legacy_flat_exported_dir" |
| }, |
| ] |
| } |
| |
| package("netstack_tools") { |
| deps = [ |
| "ifconfig", |
| "ifinfo", |
| "netstat", |
| ] |
| |
| binaries = [ |
| { |
| name = "ifconfig" |
| shell = true |
| }, |
| { |
| name = "ifinfo" |
| shell = true |
| }, |
| { |
| name = "netstat" |
| shell = true |
| }, |
| ] |
| } |
| |
| package("netstack_gotests") { |
| testonly = true |
| |
| deps = [ |
| ":netstack_connectivity_test", |
| ":netstack_fidlconv_test", |
| ":netstack_filter_test", |
| ":netstack_link_eth_test", |
| ":netstack_netiface_test", |
| ":netstack_test", |
| "netstack_service_test", |
| "//garnet/go/src/netstack/ifconfig:netstack_ifconfig_test", |
| "//garnet/go/src/netstack/netstat:netstack_netstat_test", |
| "//garnet/go/src/netstack/util:netstack_util_test", |
| ] |
| |
| binaries = [ |
| { |
| name = "netstack_service_test" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "netstack_connectivity_test" |
| }, |
| { |
| name = "netstack_fidlconv_test" |
| }, |
| { |
| name = "netstack_filter_test" |
| }, |
| { |
| name = "netstack_ifconfig_test" |
| }, |
| { |
| name = "netstack_link_eth_test" |
| }, |
| { |
| name = "netstack_netiface_test" |
| }, |
| { |
| name = "netstack_netstat_test" |
| }, |
| { |
| name = "netstack_test" |
| }, |
| { |
| name = "netstack_util_test" |
| }, |
| ] |
| } |
| |
| go_library("netstack_lib") { |
| name = "netstack" |
| |
| deps = [ |
| "//garnet/go/src/fidlext/fuchsia/hardware/ethernet:fidlext_fuchsia_hardware_ethernet_fake_lib($go_toolchain)", |
| "//garnet/public/fidl/fuchsia.devicesettings($go_toolchain)", |
| "//garnet/public/fidl/fuchsia.net.filter($go_toolchain)", |
| "//garnet/public/fidl/fuchsia.netstack($go_toolchain)", |
| "//garnet/public/fidl/fuchsia.sys($go_toolchain)", |
| "//garnet/public/go/third_party:github.com/google/btree", |
| "//garnet/public/go/third_party:github.com/google/go-cmp", |
| "//garnet/public/go/third_party:github.com/google/netstack", |
| "//garnet/public/go/third_party:golang.org/x/net", |
| "//garnet/public/lib/component/go/src/app", |
| "//zircon/public/fidl/fuchsia-hardware-ethernet($go_toolchain)", |
| "//zircon/public/fidl/fuchsia-net($go_toolchain)", |
| "//zircon/public/fidl/fuchsia-net-stack($go_toolchain)", |
| ] |
| } |
| |
| go_test("netstack_connectivity_test") { |
| gopackage = "netstack/connectivity" |
| deps = [ |
| ":netstack_lib", |
| ] |
| } |
| |
| go_test("netstack_fidlconv_test") { |
| gopackage = "netstack/fidlconv" |
| deps = [ |
| ":netstack_lib", |
| ] |
| } |
| |
| go_test("netstack_filter_test") { |
| gopackage = "netstack/filter" |
| deps = [ |
| ":netstack_lib", |
| ] |
| } |
| |
| go_test("netstack_link_eth_test") { |
| gopackage = "netstack/link/eth" |
| deps = [ |
| ":netstack_lib", |
| ] |
| } |
| |
| go_test("netstack_netiface_test") { |
| gopackage = "netstack/netiface" |
| deps = [ |
| ":netstack_lib", |
| ] |
| } |
| |
| go_test("netstack_test") { |
| gopackage = "netstack" |
| deps = [ |
| ":netstack_lib", |
| ] |
| } |