blob: 3c1f30f26680877f6586cb9e4d30fbb95e7a8e96 [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/config.gni")
import("//build/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
rustc_binary("bin") {
name = "network_manager"
edition = "2018"
with_unit_tests = true
deps = [
"core:lib",
"//garnet/lib/rust/fidl_fuchsia_hardware_ethernet_ext",
"//garnet/lib/rust/fidl_fuchsia_net_stack_ext",
"//garnet/public/lib/fidl/rust/fidl",
"//garnet/public/rust/fdio",
"//garnet/public/rust/fuchsia-async",
"//garnet/public/rust/fuchsia-component",
"//garnet/public/rust/fuchsia-syslog",
"//garnet/public/rust/fuchsia-vfs/fuchsia-vfs-watcher",
"//garnet/public/rust/fuchsia-zircon",
"//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack-rustc",
"//sdk/fidl/fuchsia.netstack:fuchsia.netstack-rustc",
"//sdk/fidl/fuchsia.overnet:fuchsia.overnet-rustc",
"//sdk/fidl/fuchsia.router.config:fuchsia.router.config-rustc",
"//src/lib/argh",
"//third_party/rust_crates:failure",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//zircon/system/fidl/fuchsia-hardware-ethernet:fuchsia-hardware-ethernet-rustc",
"//zircon/system/fidl/fuchsia-net:fuchsia-net-rustc",
]
}
package("network_manager") {
deps = [
":bin",
"core:lib",
]
binaries = [
{
name = "network_manager"
},
]
meta = [
{
path = rebase_path("meta/network_manager.cmx")
dest = "network_manager.cmx"
},
]
# TODO(cgibson): Need to figure out an appropriate delivery mechanism
# for configuration file data. Since we are only running on Toulouse, we
# can do this for now.
resources = [
{
path = rebase_path("data/toulouse.json")
dest = "factory_config.json"
},
{
path = rebase_path("data/device_schema.json")
dest = "device_schema.json"
},
]
}
test_package("network_manager_tests") {
deps = [
":bin_test",
"core:lib_test",
]
tests = [
{
name = "network_manager_bin_test"
environments = basic_envs
},
{
name = "network_manager_core_lib_test"
environments = basic_envs
},
]
resources = [
{
path = rebase_path("testdata/invalid_empty.json")
dest = "invalid_empty.json"
},
{
path = rebase_path("testdata/valid_empty.json")
dest = "valid_empty.json"
},
{
path = rebase_path("testdata/valid_factory_config.json")
dest = "valid_factory_config.json"
},
{
path = rebase_path("data/device_schema.json")
dest = "device_schema.json"
},
{
path = rebase_path("data/toulouse.json")
dest = "toulouse_factory_config.json"
},
]
}
config_data("network_manager_sysmgr_config") {
for_pkg = "sysmgr"
sources = [
rebase_path("config/network_manager.sysmgr_config"),
]
}