| # 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/testing/cc_test_executable.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", | |
| "//sdk/lib/async:async-cpp", | |
| "//sdk/lib/async-default", | |
| "//sdk/lib/async-loop:async-loop-cpp", | |
| "//sdk/lib/syslog/cpp", | |
| "//src/connectivity/lib/network-device/buffer_descriptor", | |
| "//src/lib/fxl", | |
| "//zircon/system/ulib/fbl", | |
| "//zircon/system/ulib/fzl", | |
| ] | |
| } | |
| cc_test_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", | |
| ] | |
| } | |
| 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" ] | |
| subpackages = [ "//src/connectivity/network/tun/network-tun" ] | |
| test_specs = { | |
| log_settings = { | |
| max_severity = "ERROR" | |
| } | |
| } | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":netdev-cpp-client-tests" ] | |
| } |