blob: 3ae194e767bdd5ca951cfd1b5e6a5419852ad389 [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_rust",
"//sdk/fidl/fuchsia.lowpan.driver:fuchsia.lowpan.driver_rust",
"//sdk/fidl/fuchsia.lowpan.experimental:fuchsia.lowpan.experimental_rust",
"//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",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-sync",
"//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:regex",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions",
"//src/lib/fuchsia-component-test",
"//src/lib/zircon/rust:fuchsia-zircon",
]
sources = [
"src/inspect.rs",
"src/main.rs",
"src/service.rs",
]
}
fuchsia_component("lowpanservice-cv2") {
component_name = "lowpanservice"
deps = [ ":bin" ]
manifest = "meta/lowpanservice.cml"
}
fuchsia_package("lowpanservice") {
deps = [ ":lowpanservice-cv2" ]
}
group("service") {
deps = [ ":lowpanservice" ]
}
fuchsia_unittest_package("lowpanservice-test") {
manifest = "meta/lowpanservice-test.cml"
deps = [
":bin_test",
":lowpanservice-cv2",
"//src/connectivity/lowpan/drivers/lowpan-dummy-driver:lowpan-dummy-driver-cmp",
]
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"
}