| # 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") |
| |
| go_library("netdevice") { |
| name = |
| "go.fuchsia.dev/fuchsia/src/connectivity/network/netstack/link/netdevice" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.ethernet($go_toolchain)", |
| "//sdk/fidl/fuchsia.net($go_toolchain)", |
| "//sdk/fidl/fuchsia.net.tun($go_toolchain)", |
| "//src/connectivity/network/netstack:gen/netstack/link/netdevice", |
| "//src/connectivity/network/netstack/link", |
| "//src/connectivity/network/netstack/link/fifo", |
| "//src/connectivity/network/netstack/testutil", |
| "//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_test.go", |
| "session_config.go", |
| "session_config_test.go", |
| ] |
| } |
| |
| go_test("link_netdevice_test") { |
| gopackages = [ |
| "go.fuchsia.dev/fuchsia/src/connectivity/network/netstack/link/netdevice", |
| ] |
| |
| deps = [ ":netdevice" ] |
| } |
| |
| fuchsia_unittest_component("netstack-link-netdevice-test-component") { |
| deps = [ ":link_netdevice_test" ] |
| manifest = "meta/link_netdevice_test.cmx" |
| } |
| |
| 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" ] |
| } |