| # 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/components.gni") |
| import("//build/test.gni") |
| import("//src/connectivity/network/drivers/network-device/ddk_source_split.gni") |
| |
| ddk_source_split("mac") { |
| sources = [ |
| "log.h", |
| "mac_interface.cc", |
| "mac_interface.h", |
| "public/network_mac.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/banjo/fuchsia.hardware.network.mac:fuchsia.hardware.network.mac_banjo_cpp", |
| "//sdk/fidl/fuchsia.hardware.network:fuchsia.hardware.network_llcpp", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/fidl", |
| "//zircon/system/ulib/fidl-async:fidl-async-cpp", |
| "//zircon/system/ulib/fidl-utils", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":network-device-mac-lib-test" ] |
| } |
| |
| test("test_bin") { |
| output_name = "network-device-mac-lib-test" |
| sources = [ |
| "network_mac-test.cc", |
| "test_util.cc", |
| "test_util.h", |
| ] |
| deps = [ |
| ":mac", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/predicates", |
| "//third_party/googletest:gmock", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_unittest_package("network-device-mac-lib-test") { |
| deps = [ ":test_bin" ] |
| } |