blob: 40bf007091ed8b1ccb174f15f3dace902355fc38 [file] [log] [blame]
# Copyright 2023 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.
# This file was generated by the `fx create` command. The template
# is located at `//tools/create/templates/component-test/BUILD.gn.tmpl-rust`.
# If you find something broken, we are eager to review fixes.
import("//build/components.gni")
import("//build/rust/rustc_binary.gni")
group("tests") {
testonly = true
deps = [
":package",
":unittests",
]
}
rustc_binary("bin") {
name = "inspect_system"
with_unit_tests = true
edition = "2021"
deps = [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust",
"//sdk/fidl/fuchsia.test:fuchsia.test_rust",
"//sdk/fidl/fuchsia.test:rust_measure_tape_for_case",
"//src/lib/diagnostics/reader",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/performance/lib/fuchsiaperf",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tracing",
]
sources = [
"src/diagnostics.rs",
"src/main.rs",
"src/metrics.rs",
]
}
fuchsia_component("component") {
testonly = true
component_name = "inspect-system"
manifest = "meta/inspect_system.cml"
deps = [ ":bin" ]
}
# Run with `fx test inspect-system-tests`.
fuchsia_test_package("package") {
package_name = "inspect-system-tests"
test_components = [ ":component" ]
}
# Run with `fx test inspect-system-unittests`
fuchsia_unittest_package("unittests") {
package_name = "inspect-system-unittests"
deps = [ ":bin_test" ]
}