| # Copyright 2021 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/components.gni") |
| import("//build/go/go_library.gni") |
| import("//build/go/go_test.gni") |
| import("//build/go/toolchain.gni") |
| import("netdevice_include_dirs.gni") |
| |
| go_library("netdevice") { |
| deps = [ |
| "//sdk/fidl/fuchsia.net:fuchsia.net_go($go_toolchain)", |
| "//sdk/fidl/fuchsia.net.tun:fuchsia.net.tun_go($go_toolchain)", |
| "//src/connectivity/network/netstack/link", |
| "//src/connectivity/network/netstack/link/fifo", |
| "//src/connectivity/network/netstack/sync", |
| "//src/connectivity/network/netstack/testutil", |
| "//src/connectivity/network/netstack/tracing/provider", |
| "//src/connectivity/network/netstack/tracing/trace", |
| "//src/lib/component", |
| "//src/lib/syslog/go", |
| "//third_party/golibs:github.com/google/go-cmp", |
| "//third_party/golibs:gvisor.dev/gvisor", |
| ] |
| |
| sources = [ |
| "client.go", |
| "client_fifo.go", |
| "client_test.go", |
| "entries.go", |
| "entries_test.go", |
| "session_config.go", |
| "session_config_test.go", |
| ] |
| } |
| |
| go_test("link_netdevice_test") { |
| library = ":netdevice" |
| include_dirs = netdevice_include_dirs |
| } |
| |
| fuchsia_unittest_component("netstack-link-netdevice-test-component") { |
| deps = [ ":link_netdevice_test" ] |
| manifest = "meta/link_netdevice_test.cml" |
| } |
| |
| fuchsia_test_package("netstack-link-netdevice-gotests") { |
| deps = [ "//src/connectivity/network/tun/network-tun:component" ] |
| |
| test_components = [ ":netstack-link-netdevice-test-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":netstack-link-netdevice-gotests" ] |
| } |