| # Copyright 2020 The Chromium OS 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("//common-mk/pkg_config.gni") |
| |
| # Library that provides cros_healthd's network diagnostics adapter functionality. |
| pkg_config("libnetwork_diagnostics_pkg_deps") { |
| pkg_deps = [ |
| "libchrome", |
| "libmojo", |
| ] |
| } |
| |
| source_set("libnetwork_diagnostics_adapter") { |
| configs += [ ":libnetwork_diagnostics_pkg_deps" ] |
| deps = [ "//diagnostics/mojo:network_diagnostics_mojo_bindings" ] |
| sources = [ "network_diagnostics_adapter_impl.cc" ] |
| } |
| |
| if (use.test) { |
| pkg_config("network_diagnostics_test_pkg_deps") { |
| pkg_deps = [ "libchrome-test" ] |
| } |
| |
| executable("network_diagnostics_test") { |
| configs += [ |
| ":network_diagnostics_test_pkg_deps", |
| "//common-mk:test", |
| ] |
| deps = [ |
| ":libnetwork_diagnostics_adapter", |
| "//diagnostics/common:mojo_testrunner", |
| ] |
| sources = [ "network_diagnostics_adapter_impl_test.cc" ] |
| } |
| } |
| |
| if (use.test || use.fuzzer) { |
| pkg_config("libnetwork_diagnostics_adapter_test_utils_pkg_deps") { |
| pkg_deps = [ "libchrome-test" ] |
| } |
| |
| source_set("libnetwork_diagnostics_adapter_test_utils") { |
| configs += [ ":libnetwork_diagnostics_adapter_test_utils_pkg_deps" ] |
| deps = [ |
| ":libnetwork_diagnostics_adapter", |
| "//diagnostics/mojo:cros_healthd_mojo_bindings", |
| ] |
| sources = [ "mock_network_diagnostics_adapter.cc" ] |
| } |
| } |