blob: 2b9843e1f345ef2ff8a92a43cf236b80451a99cc [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/components.gni")
import("//build/rust/rustc_binary.gni")
import("//src/sys/core/build/core_shard.gni")
rustc_binary("bin") {
name = "lowpanservice"
with_unit_tests = true
edition = "2021"
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.driver:fuchsia.lowpan.driver-rustc",
"//sdk/fidl/fuchsia.lowpan.test:fuchsia.lowpan.test-rustc",
"//sdk/fidl/fuchsia.lowpan.thread:fuchsia.lowpan.thread-rustc",
"//sdk/fidl/fuchsia.net:fuchsia.net-rustc",
"//src/connectivity/lowpan/lib/lowpan_driver_common",
"//src/lib/async-utils",
"//src/lib/diagnostics/inspect/contrib/rust",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//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:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:log",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:regex",
"//third_party/rust_crates:slab",
"//third_party/rust_crates:thiserror",
]
sources = [
"src/inspect.rs",
"src/main.rs",
"src/service.rs",
]
}
fuchsia_component("lowpanservice-cv2") {
component_name = "lowpanservice"
deps = [ ":bin" ]
manifest = "meta/lowpanservice.cml"
}
fuchsia_component("lowpanservice-cv1") {
component_name = "lowpanservice"
deps = [ ":bin" ]
manifest = "meta/lowpanservice.cmx"
}
fuchsia_package("lowpanservice") {
deps = [
":lowpanservice-cv1",
":lowpanservice-cv2",
]
}
group("service") {
deps = [ ":lowpanservice" ]
}
fuchsia_unittest_package("lowpanservice-test") {
manifest = "meta/lowpanservice-test.cmx"
deps = [
":bin_test",
"//src/connectivity/lowpan/drivers/lowpan-dummy-driver",
]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
deps = [ ":lowpanservice-test" ]
}
core_shard("lowpanservice_shard") {
shard_file = "meta/lowpanservice.core_shard.cml"
}