blob: bed1b3d472de16425a5028a89f3375e28c1b8300 [file] [log] [blame]
# 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_library.gni")
import("//src/sys/build/components.gni")
config_data("enable-report-filing") {
for_pkg = "triage-detect"
sources = [ "configs/enable-filing.json" ]
outputs = [ "config.json" ]
}
rustc_library("lib") {
name = "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/control:controller-rustc",
"//src/diagnostics/lib/triage",
"//src/diagnostics/lib/util/injectable-time",
"//src/lib/diagnostics/reader/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:serde",
"//third_party/rust_crates:serde_derive",
"//third_party/rust_crates:serde_json5",
"//third_party/rust_crates:thiserror",
]
sources = [
"src/delay_tracker.rs",
"src/diagnostics.rs",
"src/lib.rs",
"src/snapshot.rs",
"src/triage_shim.rs",
]
test_deps = []
}
fuchsia_component("triage-detect-component") {
component_name = "triage-detect"
deps = [
"//src/diagnostics/config/triage:triage-detect",
"//src/diagnostics/launcher:bin",
]
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 = [ ":lib_test" ]
}
group("tests") {
testonly = true
deps = [
":triage-detect-tests",
"//src/diagnostics/detect/integration",
]
}