| # Copyright 2019 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/config.gni") |
| import("//build/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| rustc_binary("bin") { |
| name = "reachability" |
| version = "0.1.0" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "core:lib", |
| "//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack-rustc", |
| "//sdk/fidl/fuchsia.netstack:fuchsia.netstack-rustc", |
| "//src/connectivity/management/network_manager/core:lib", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/inspect/rust/fuchsia-inspect", |
| "//src/lib/inspect/rust/fuchsia-inspect-contrib", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:thiserror", |
| "//zircon/system/fidl/fuchsia-net:fuchsia-net-rustc", |
| ] |
| |
| test_deps = [ |
| "//src/connectivity/network/testing/netemul/lib/fidl:environment-rustc", |
| "//src/connectivity/network/testing/netemul/lib/fidl:network-rustc", |
| "//src/connectivity/network/testing/netemul/lib/fidl:sandbox-rustc", |
| "//third_party/rust_crates:pin-utils", |
| ] |
| } |
| |
| package("reachability") { |
| deps = [ |
| ":bin", |
| "core:lib", |
| ] |
| |
| binaries = [ |
| { |
| name = "reachability" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/reachability.cmx") |
| dest = "reachability.cmx" |
| }, |
| ] |
| } |
| |
| test_package("reachability_tests") { |
| deps = [ |
| ":bin_test", |
| "core:lib_test", |
| ] |
| |
| tests = [ |
| { |
| name = "reachability_bin_test" |
| environments = basic_envs |
| }, |
| { |
| name = "reachability_core_lib_test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| test_package("reachability_integration_tests") { |
| deps = [ "tests:reachability_integration_test" ] |
| |
| tests = [ |
| { |
| name = "reachability_integration_test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| "//src/connectivity/management/reachability", |
| "//src/connectivity/management/reachability:reachability_integration_tests", |
| "//src/connectivity/management/reachability:reachability_tests", |
| "//src/connectivity/network/testing/netemul", |
| ] |
| } |
| |
| config_data("reachability_sysmgr_config") { |
| for_pkg = "sysmgr" |
| sources = [ rebase_path("config/reachability.sysmgr_config") ] |
| } |