| # 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/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| import("//build/test/test_package.gni") |
| |
| driver_module("ethertap") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs -= [ "//build/config/fuchsia:no_cpp_standard_library" ] |
| configs += [ |
| "//build/config/fuchsia:static_cpp_standard_library", |
| "//build/unification/config:zircon-migrated", |
| ] |
| sources = [ "ethertap.cc" ] |
| deps = [ |
| "//sdk/banjo/ddk.protocol.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 = [ |
| "//sdk/banjo/ddk.protocol.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-utils", |
| "//zircon/system/ulib/fzl", |
| ] |
| } |
| |
| unittest_package("ethertap-unittest-package") { |
| package_name = "ethertap-unittest" |
| deps = [ ":ethertap-unittest" ] |
| |
| tests = [ |
| { |
| name = "ethertap-unittest" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":ethertap-unittest-package" ] |
| } |