blob: 3b97fe1d61251b30f8f83d73f95c33f27b4bfdb9 [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_test_component("component") {
component_name = "inspect-system"
manifest = "meta/inspect_system.cml"
test_type = "system"
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" ]
}