| # 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/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", | |
| "//garnet/public/lib/fidl/rust/fidl", | |
| "//garnet/public/rust/fuchsia-async", | |
| "//garnet/public/rust/fuchsia-component", | |
| "//garnet/public/rust/fuchsia-syslog", | |
| "//garnet/public/rust/fuchsia-zircon", | |
| "//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack-rustc", | |
| "//sdk/fidl/fuchsia.netstack:fuchsia.netstack-rustc", | |
| "//third_party/rust_crates:failure", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:log", | |
| "//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:sandbox-rustc", | |
| "//src/connectivity/network/testing/netemul/lib/fidl:network-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", | |
| ] | |
| } |