| # Copyright 2020 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/config.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//src/sys/build/components.gni") |
| |
| rustc_binary("bin") { |
| name = "triage-detect" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics-rustc", |
| "//sdk/fidl/fuchsia.feedback:fuchsia.feedback-rustc", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc", |
| "//src/diagnostics/lib/injectable-time", |
| "//src/diagnostics/lib/triage", |
| "//src/lib/diagnostics/inspect/contrib/rust", |
| "//src/lib/fdio/rust:fdio", |
| "//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:argh", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ |
| "src/delay_tracker.rs", |
| "src/diagnostics.rs", |
| "src/main.rs", |
| "src/snapshot.rs", |
| "src/triage_shim.rs", |
| ] |
| |
| test_deps = [] |
| } |
| |
| fuchsia_component("triage-detect-component") { |
| deps = [ |
| ":bin", |
| "//src/diagnostics/config/triage:triage-detect", |
| ] |
| manifest = "meta/triage-detect.cml" |
| } |
| |
| fuchsia_package("triage-detect") { |
| deps = [ ":triage-detect-component" ] |
| } |
| |
| fuchsia_unittest_package("triage-detect-tests") { |
| manifest = "meta/triage-detect-tests.cmx" |
| deps = [ ":bin_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":triage-detect-tests" ] |
| } |