blob: 524f5b17e414b25b40a0aee541d8e57d74cacf1d [file] [log] [blame]
# 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/rust/rustc_binary.gni")
import("//build/rust/rustc_test.gni")
import("//src/sys/build/components.gni")
rustc_binary("bin") {
output_name = "dhcpd_cli"
edition = "2018"
deps = [
"//sdk/fidl/fuchsia.net:fuchsia.net-rustc",
"//sdk/fidl/fuchsia.net.dhcp:fuchsia.net.dhcp-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/network/fidl_fuchsia_hardware_ethernet_ext",
"//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",
]
sources = [
"src/args.rs",
"src/main.rs",
]
configs -= [ "//build/config/rust:allow_unused_results" ]
}
fuchsia_component("component") {
component_name = "dhcpd-cli"
deps = [ ":bin" ]
manifest = "meta/dhcpd-cli.cmx"
}
rustc_test("dhcpd-cli-test") {
edition = "2018"
deps = [
"//sdk/fidl/fuchsia.net:fuchsia.net-rustc",
"//sdk/fidl/fuchsia.net.dhcp:fuchsia.net.dhcp-rustc",
"//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc",
"//sdk/fidl/fuchsia.stash:fuchsia.stash-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//src/connectivity/lib/net-declare",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
]
sources = [ "src/lib.rs" ]
configs -= [ "//build/config/rust:allow_unused_results" ]
}
fuchsia_shell_package("dhcpd-cli") {
deps = [
":bin",
":component",
]
}
fuchsia_unittest_package("dhcpd-cli-tests") {
deps = [
":component",
":dhcpd-cli-test",
"//src/connectivity/network/dhcp:component-v1",
"//src/connectivity/network/netstack:component-debug",
"//src/sys/stash:stash_secure",
]
manifest = "meta/dhcpd_cli_test.cmx"
}
group("tests") {
testonly = true
deps = [ ":dhcpd-cli-tests" ]
}