|  | # 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/rust/rustc_library.gni") | 
|  | import("//build/rust/rustc_test.gni") | 
|  |  | 
|  | lib_deps = [ | 
|  | "//src/diagnostics/lib/selectors", | 
|  | "//src/lib/diagnostics/inspect/node-hierarchy/rust", | 
|  | "//third_party/rust_crates:anyhow", | 
|  | "//third_party/rust_crates:itertools", | 
|  | "//third_party/rust_crates:lazy_static", | 
|  | "//third_party/rust_crates:maplit", | 
|  | "//third_party/rust_crates:nom", | 
|  | "//third_party/rust_crates:num-derive", | 
|  | "//third_party/rust_crates:num-traits", | 
|  | "//third_party/rust_crates:regex", | 
|  | "//third_party/rust_crates:serde", | 
|  | "//third_party/rust_crates:serde_derive", | 
|  | "//third_party/rust_crates:serde_json", | 
|  | "//third_party/rust_crates:serde_json5", | 
|  | ] | 
|  |  | 
|  | library_sources = [ | 
|  | "src/act.rs", | 
|  | "src/config.rs", | 
|  | "src/config/parse.rs", | 
|  | "src/lib.rs", | 
|  | "src/metrics.rs", | 
|  | "src/metrics/fetch.rs", | 
|  | "src/metrics/variable.rs", | 
|  | "src/plugins.rs", | 
|  | "src/plugins/crashes.rs", | 
|  | "src/plugins/memory.rs", | 
|  | "src/plugins/sandbox_errors.rs", | 
|  | "src/result_format.rs", | 
|  | "src/validate.rs", | 
|  | ] | 
|  |  | 
|  | rustc_library("triage") { | 
|  | edition = 2018 | 
|  | version = "0.0.1" | 
|  |  | 
|  | deps = lib_deps | 
|  |  | 
|  | sources = library_sources | 
|  | } | 
|  |  | 
|  | rustc_test("triage_lib_unittests") { | 
|  | deps = [ ":triage" ] + lib_deps | 
|  |  | 
|  | sources = library_sources | 
|  | } | 
|  |  | 
|  | group("tests") { | 
|  | testonly = true | 
|  | deps = [ | 
|  | ":triage_lib_unittests($host_toolchain)", | 
|  | "wasm:tests", | 
|  | ] | 
|  | } |