| # 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/test/test_package.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/ddk.protocol.network.mac", |
| "//sdk/fidl/fuchsia.hardware.network:fuchsia.hardware.network_llcpp", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/fidl-async-cpp", |
| "//zircon/public/lib/fzl", |
| "//zircon/system/ulib/fidl-utils", |
| ] |
| |
| # TODO(44349): UBSan has found an instance of undefined behavior in this target. |
| # Disable UBSan for this target temporarily until it is migrated into CI/CQ. |
| # Add to public_configs since the UB is exposed through a public header. |
| public_configs = [ "//build/config:temporarily_disable_ubsan_do_not_use" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":network-device-mac-lib-test" ] |
| } |
| |
| executable("test_bin") { |
| testonly = true |
| output_name = "network-device-mac-lib-test" |
| sources = [ |
| "network_mac-test.cc", |
| "test_util.cc", |
| "test_util.h", |
| ] |
| deps = [ |
| ":mac", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| unittest_package("network-device-mac-lib-test") { |
| deps = [ ":test_bin" ] |
| tests = [ |
| { |
| name = "network-device-mac-lib-test" |
| environments = [ qemu_env ] |
| }, |
| ] |
| } |