| # 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/bind/bind.gni") |
| import("//build/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| import("//src/sys/build/fuchsia_unittest_package.gni") |
| |
| bind_rules("ethertap_bind") { |
| rules = "ethertap.bind" |
| output = "ethertap-bind.h" |
| tests = "bind-tests.json" |
| deps = [ "//src/devices/bind/fuchsia.test" ] |
| } |
| |
| driver_module("ethertap") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "ethertap.cc" ] |
| deps = [ |
| ":ethertap_bind", |
| "//sdk/banjo/fuchsia.hardware.ethernet", |
| "//sdk/fidl/fuchsia.hardware.ethernet:fuchsia.hardware.ethernet_c", |
| "//sdk/fidl/fuchsia.hardware.ethertap:fuchsia.hardware.ethertap_c", |
| "//src/devices/lib/dev-operation", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/pretty", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| test("ethertap-unittest") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| output_name = "ethertap-unittest" |
| configs += [ "//build/config:all_source" ] |
| sources = [ |
| "ethertap-test.cc", |
| "ethertap.cc", |
| ] |
| deps = [ |
| ":ethertap_bind", |
| "//sdk/banjo/fuchsia.hardware.ethernet", |
| "//sdk/fidl/fuchsia.hardware.ethernet:fuchsia.hardware.ethernet_c", |
| "//sdk/fidl/fuchsia.hardware.ethertap:fuchsia.hardware.ethertap_c", |
| "//src/devices/lib/dev-operation", |
| "//src/devices/testing/fake_ddk", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/pretty", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/fidl:fidl_base", |
| "//zircon/system/ulib/fidl-utils", |
| "//zircon/system/ulib/fzl", |
| ] |
| } |
| |
| fuchsia_unittest_package("ethertap-unittest-package") { |
| package_name = "ethertap-unittest" |
| deps = [ ":ethertap-unittest" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":ethertap-unittest-package", |
| ":ethertap_bind_test", |
| ] |
| } |