| # Copyright 2018 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 = "ping3" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//garnet/lib/rust/fidl_fuchsia_net_ext", |
| "//sdk/fidl/fuchsia.net.icmp:fuchsia.net.icmp-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zerocopy", |
| "//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:structopt", |
| "//third_party/rust_crates:thiserror", |
| "//zircon/system/fidl/fuchsia-net:fuchsia-net-rustc", |
| ] |
| |
| test_deps = [ |
| "//garnet/lib/rust/fidl_fuchsia_net_stack_ext", |
| "//sdk/fidl/fuchsia.hardware.ethernet:fuchsia.hardware.ethernet-rustc", |
| "//sdk/fidl/fuchsia.net.icmp:fuchsia.net.icmp-rustc", |
| "//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//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", |
| ] |
| } |
| |
| package("ping3") { |
| deps = [ ":bin" ] |
| |
| binaries = [ |
| { |
| name = "ping3" |
| shell = true |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/ping3.cmx") |
| dest = "ping3.cmx" |
| }, |
| ] |
| } |
| |
| test_package("ping3_tests") { |
| deps = [ ":bin_test" ] |
| |
| tests = [ |
| { |
| name = "ping3_bin_test" |
| environments = [ qemu_env ] |
| }, |
| ] |
| } |