blob: c2e73836eb8c2780ec05ce8f8a4ccbee39d90c82 [file] [log] [blame]
# Copyright 2020 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/components.gni")
import("//build/rust/rustc_binary.gni")
rustc_binary("dhcpv6_client") {
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.net:fuchsia.net-rustc",
"//sdk/fidl/fuchsia.net.dhcpv6:fuchsia.net.dhcpv6-rustc",
"//sdk/fidl/fuchsia.net.name:fuchsia.net.name-rustc",
"//src/connectivity/lib/net-declare",
"//src/connectivity/lib/packet-formats-dhcp",
"//src/connectivity/network/dhcpv6/core",
"//src/connectivity/network/lib/dns_server_watcher",
"//src/lib/async-utils",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/network/fidl_fuchsia_net_ext",
"//src/lib/network/packet",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:socket2",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tracing",
]
sources = [
"src/client.rs",
"src/main.rs",
"src/provider.rs",
]
configs -= [ "//build/config/rust:allow_unused_results" ]
}
fuchsia_component("component") {
component_name = "dhcpv6-client"
manifest = "meta/dhcpv6-client.cml"
deps = [ ":dhcpv6_client" ]
}
fuchsia_component("dhcpv6-client-test") {
testonly = true
manifest = "meta/dhcpv6-client-test.cml"
deps = [ ":dhcpv6_client_test" ]
}
fuchsia_test_package("dhcpv6-client-tests") {
test_components = [ ":dhcpv6-client-test" ]
deps = [
# The DHCPv6 client creates sockets so it depends on an implementation of
# `fuchsia.posix.socket.Provider`.
"//src/connectivity/network/netstack:component-debug",
]
}
group("tests") {
testonly = true
deps = [ ":dhcpv6-client-tests" ]
}