blob: 45bdaeb17331ad24b14c94e5f0cf0ed0c439d5ac [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/test/test_package.gni")
import("//build/testing/environments.gni")
rustc_binary("bin") {
name = "overnetstack"
with_unit_tests = true
edition = "2018"
deps = [
"//sdk/fidl/fuchsia.net.mdns:fuchsia.net.mdns-rustc",
"//sdk/fidl/fuchsia.overnet:fuchsia.overnet-rustc",
"//sdk/fidl/fuchsia.overnet.protocol:fuchsia.overnet.protocol-rustc",
"//src/connectivity/overnet/lib/core",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//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:log",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:thiserror",
"//zircon/system/fidl/fuchsia-net:fuchsia-net-rustc",
]
}
package("overnetstack") {
deps = [ ":bin" ]
binary = "overnetstack"
meta = [
{
path = rebase_path("meta/overnetstack.cmx")
dest = "overnetstack.cmx"
},
]
# TODO(ctiller): This is clearly insanity and we should not be hardcoding certificates
# and private keys into the overnetstack package. Design and implement security.
resources = [
{
path = rebase_path("//third_party/rust-mirrors/quiche/examples/cert.crt")
dest = "cert.crt"
},
{
path = rebase_path("//third_party/rust-mirrors/quiche/examples/cert.key")
dest = "cert.key"
},
]
}
test_package("overnetstack-tests") {
deps = [ ":bin_test" ]
tests = [
{
name = "overnetstack_bin_test"
environments = basic_envs
},
]
}
group("tests") {
testonly = true
public_deps = [ ":overnetstack-tests" ]
}