blob: 841cbe7c3e96483ef24e112dcc18eaaa290a0cd0 [file] [log] [blame]
# 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/rust/rustc_library.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
rustc_library("dhcp") {
with_unit_tests = true
edition = "2018"
deps = [
"//garnet/lib/rust/fidl_fuchsia_hardware_ethernet_ext",
"//garnet/public/rust/fuchsia-syslog",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:bytes",
"//third_party/rust_crates:failure",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_derive",
"//third_party/rust_crates:serde_json",
]
}
unittest_package("dhcp_tests") {
deps = [
":dhcp_test",
]
tests = [
{
name = "dhcp_lib_test"
environments = [ qemu_env ]
},
]
}
rustc_binary("bin") {
name = "dhcpd"
edition = "2018"
deps = [
":dhcp",
"//garnet/public/rust/fuchsia-async",
"//garnet/public/rust/fuchsia-syslog",
"//garnet/public/rust/fuchsia-zircon",
"//third_party/rust_crates:failure",
"//third_party/rust_crates:futures-preview",
"//third_party/rust_crates:getopts",
"//third_party/rust_crates:void",
]
}
package("dhcpd") {
deps = [
":bin",
]
meta = [
{
path = rebase_path("meta/dhcpd.cmx")
dest = "dhcpd.cmx"
},
]
resources = [
{
path = rebase_path("data/test_server_config.json")
dest = "config.json"
},
]
binaries = [
{
name = "dhcpd"
},
]
}