| # 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") |
| |
| source_set("cpp") { |
| sources = [ |
| "network_device_client.cc", |
| "network_device_client.h", |
| ] |
| |
| deps = [ "//sdk/lib/fit-promise" ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.hardware.network:fuchsia.hardware.network_cpp", |
| "//src/connectivity/lib/network-device/buffer_descriptor", |
| "//src/lib/fxl", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/fzl", |
| ] |
| |
| # TODO(fxbug.dev/94768): This target uses mutable tables which are deprecated, |
| # rather than builders. |
| configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ] |
| } |
| |
| executable("cpp-test") { |
| testonly = true |
| |
| sources = [ "network_device_client_test.cc" ] |
| |
| deps = [ |
| ":cpp", |
| "//sdk/fidl/fuchsia.net.tun:fuchsia.net.tun_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/fit-promise", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//src/lib/testing/predicates", |
| "//third_party/googletest:gmock", |
| ] |
| |
| # TODO(fxbug.dev/94768): This target uses mutable tables which are deprecated, |
| # rather than builders. |
| configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ] |
| } |
| |
| fuchsia_unittest_component("cpp-test-component") { |
| deps = [ ":cpp-test" ] |
| manifest = "meta/cpp-test.cml" |
| } |
| |
| fuchsia_test_package("netdev-cpp-client-tests") { |
| test_components = [ ":cpp-test-component" ] |
| deps = [ "//src/connectivity/network/tun/network-tun:component" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":netdev-cpp-client-tests" ] |
| } |