blob: d17263dd950c2c555e03c37a0763096f54c25935 [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/package.gni")
import("//build/rust/rustc_binary.gni")
import("//src/sys/build/components.gni")
rustc_binary("bin") {
name = "lowpanctl"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.factory.lowpan:fuchsia.factory.lowpan-rustc",
"//sdk/fidl/fuchsia.lowpan:fuchsia.lowpan-rustc",
"//sdk/fidl/fuchsia.lowpan.device:fuchsia.lowpan.device-rustc",
"//sdk/fidl/fuchsia.lowpan.test:fuchsia.lowpan.test-rustc",
"//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:clap",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:hex",
"//third_party/rust_crates:log",
"//third_party/rust_crates:thiserror",
]
sources = [
"src/context.rs",
"src/energy_scan_command.rs",
"src/form_command.rs",
"src/get_credential.rs",
"src/get_mac_filter_settings_command.rs",
"src/get_neighbor_table_command.rs",
"src/get_supported_channels.rs",
"src/get_supported_network_types.rs",
"src/invocation.rs",
"src/join_command.rs",
"src/leave_command.rs",
"src/list_command.rs",
"src/main.rs",
"src/mfg_command.rs",
"src/network_scan_command.rs",
"src/provision_command.rs",
"src/repeat_command.rs",
"src/replace_mac_filter_settings_command.rs",
"src/reset_command.rs",
"src/set_active_comamnd.rs",
"src/status_command.rs",
]
}
package("lowpanctl") {
meta = [
{
path = rebase_path("meta/lowpanctl.cmx")
dest = "lowpanctl.cmx"
},
]
deps = [ ":bin" ]
binaries = [
{
name = "lowpanctl"
shell = true
},
]
}
fuchsia_unittest_package("lowpanctl-unittests") {
deps = [ ":bin_test" ]
}
group("tests") {
testonly = true
deps = [
":lowpanctl-unittests",
"test",
]
}