blob: a26536fe7ad6d5180b259fb88b8f3f5ed1d8ca16 [file] [log] [blame]
# Copyright 2021 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/rust/rustc_library.gni")
import("//src/developer/ffx/build/ffx_tool.gni")
assert(is_host, "ffx_inspect is intended for the host toolchain only.")
rustc_library("ffx_inspect_args") {
version = "0.1.0"
edition = "2021"
sources = [ "src/args.rs" ]
source_root = "src/args.rs"
deps = [
"//src/diagnostics/iquery:lib",
"//third_party/rust_crates:argh",
]
}
rustc_library("ffx_inspect") {
version = "0.1.0"
edition = "2021"
with_unit_tests = true
sources = [
"src/accessor_provider.rs",
"src/apply_selectors/filter.rs",
"src/apply_selectors/mod.rs",
"src/apply_selectors/screen.rs",
"src/apply_selectors/terminal.rs",
"src/apply_selectors/test_utils.rs",
"src/lib.rs",
"src/tests/list.rs",
"src/tests/list_accessors.rs",
"src/tests/mod.rs",
"src/tests/selectors.rs",
"src/tests/show.rs",
"src/tests/utils.rs",
]
deps = [
":ffx_inspect_args",
"//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust",
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust",
"//sdk/fidl/fuchsia.diagnostics.host:fuchsia.diagnostics.host_rust",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust",
"//src/developer/ffx/lib/errors:lib",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/rcs:lib",
"//src/developer/ffx/lib/target/holders:lib",
"//src/developer/ffx/lib/writer:lib",
"//src/diagnostics/iquery:lib",
"//src/lib/diagnostics/data/rust",
"//src/lib/diagnostics/hierarchy/rust",
"//src/lib/diagnostics/selectors",
"//src/lib/fuchsia-async",
"//src/sys/lib/moniker",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:difference",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:termion",
]
test_deps = [
"//src/developer/ffx/lib/writer:lib",
"//src/diagnostics/iquery/test_support:iquery_test_support",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//third_party/rust_crates:pretty_assertions",
"//third_party/rust_crates:tempfile",
]
}
ffx_tool("ffx_inspect_tool") {
# Needed for Honeydew's SDK inclusion
#
# TODO(b/330934833): Remove when IDK allows for `testonly` targets in dep
# tree or when we can separate the concept of data_dep from host_test_data.
testonly = false
edition = "2021"
output_name = "ffx-inspect"
deps = [
":ffx_inspect",
"//src/developer/ffx/lib/fho:lib",
"//src/lib/fuchsia-async",
]
sources = [ "src/main.rs" ]
sdk_target_name = "sdk"
sdk_category = "partner"
}
group("inspect") {
public_deps = [
":ffx_inspect_tool",
":ffx_inspect_tool_host_tool",
]
}
group("bin") {
public_deps = [ ":ffx_inspect_tool_versioned" ]
}
group("tests") {
testonly = true
deps = [ ":ffx_inspect_test" ]
}