| # 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/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.hardware.ethernet:fuchsia.hardware.ethernet-rustc", |
| "//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/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/storage/fuchsia-vfs-watcher", |
| "//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:thiserror", |
| "//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" |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path("data/device_schema.json") |
| dest = "device_schema.json" |
| }, |
| ] |
| } |
| |
| config_data("config_default") { |
| for_pkg = "network_manager" |
| sources = [ rebase_path("config/default.json") ] |
| outputs = [ "factory_config.json" ] |
| } |
| |
| config_data("config_no_ssh_over_wlan") { |
| for_pkg = "network_manager" |
| sources = [ rebase_path("config/no_ssh_over_wlan.json") ] |
| outputs = [ "factory_config.json" ] |
| } |
| |
| config_data("config_toulouse") { |
| for_pkg = "network_manager" |
| sources = [ rebase_path("config/toulouse.json") ] |
| outputs = [ "factory_config.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_factory_configs/invalid_empty.json" |
| }, |
| { |
| path = rebase_path("testdata/valid_empty.json") |
| dest = "valid_factory_configs/valid_empty.json" |
| }, |
| { |
| path = rebase_path("testdata/valid_factory_config.json") |
| dest = "valid_factory_configs/valid_factory_config.json" |
| }, |
| { |
| path = rebase_path("data/device_schema.json") |
| dest = "device_schema.json" |
| }, |
| { |
| path = rebase_path("config/toulouse.json") |
| dest = "valid_factory_configs/toulouse.json" |
| }, |
| { |
| path = rebase_path("config/default.json") |
| dest = "valid_factory_configs/config.json" |
| }, |
| { |
| path = rebase_path("config/no_ssh_over_wlan.json") |
| dest = "valid_factory_configs/no_ssh_over_wlan.json" |
| }, |
| ] |
| } |
| |
| config_data("network_manager_sysmgr_config") { |
| for_pkg = "sysmgr" |
| sources = [ rebase_path("config/network_manager.sysmgr_config") ] |
| } |