| # Copyright 2020 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/test_package.gni") |
| import("//build/unification/images/migrated_manifest.gni") |
| |
| source_set("src") { |
| sources = [ |
| "network_device.cc", |
| "network_device.h", |
| ] |
| public_deps = [ |
| "device:device_ddk", |
| "mac:mac_ddk", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/lib/ddktl", |
| ] |
| } |
| |
| driver_module("network-device") { |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| configs -= [ "//build/config/fuchsia:no_cpp_standard_library" ] |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| |
| deps = [ |
| ":src", |
| "//src/devices/lib/driver", |
| ] |
| } |
| |
| migrated_manifest("manifest") { |
| deps = [ ":network-device" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":network-device-test", |
| "device:tests", |
| "mac:tests", |
| ] |
| } |
| |
| executable("driver-test") { |
| testonly = true |
| output_name = "network-device-test" |
| sources = [ |
| "device/test_util.cc", |
| "device/test_util.h", |
| "mac/test_util.cc", |
| "mac/test_util.h", |
| "network_device_test.cc", |
| ] |
| deps = [ |
| ":src", |
| "//src/devices/testing/fake-bti", |
| "//src/devices/testing/fake_ddk", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| unittest_package("network-device-test") { |
| deps = [ ":driver-test" ] |
| tests = [ |
| { |
| name = "network-device-test" |
| environments = [ qemu_env ] |
| }, |
| ] |
| } |