blob: db131d8fe4068deab0fdbe3d61de32585c51c6bc [file] [log] [blame] [edit]
# 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/rust/rustc_test.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
rustc_binary("bin") {
name = "dhcpd_cli"
with_unit_tests = true
edition = "2018"
deps = [
"//garnet/lib/rust/fidl_fuchsia_hardware_ethernet_ext",
"//sdk/fidl/fuchsia.net.dhcp:fuchsia.net.dhcp-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:thiserror",
"//zircon/system/fidl/fuchsia-net:fuchsia-net-rustc",
]
}
rustc_test("tests") {
name = "dhcpd_cli_tests"
edition = "2018"
deps = [
"//sdk/fidl/fuchsia.net.dhcp:fuchsia.net.dhcp-rustc",
"//sdk/fidl/fuchsia.stash:fuchsia.stash-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:rand",
]
}
package("dhcpd-cli") {
deps = [ ":bin" ]
binaries = [
{
name = "dhcpd_cli"
dest = "dhcpd-cli"
shell = true
},
]
meta = [
{
path = rebase_path("meta/dhcpd-cli.cmx")
dest = "dhcpd-cli.cmx"
},
]
}
test_package("dhcpd_cli_tests") {
deps = [
":bin_test",
":tests",
"//src/connectivity/network/dhcp",
]
tests = [
{
name = "dhcpd_cli_tests"
environments = [ qemu_env ]
},
]
}