blob: e2ec5aeecc28dca7479f76c683f47c202cb0d736 [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/components.gni")
import("//build/config.gni")
import("//build/rust/rustc_library.gni")
rustc_library("lib") {
name = "persistence"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.feedback:fuchsia.feedback-rustc",
"//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc",
"//src/diagnostics/control:controller-rustc",
"//src/diagnostics/lib/inspect-fetcher",
"//src/diagnostics/lib/util/injectable-time",
"//src/diagnostics/persistence/fidl:persist-rustc",
"//src/lib/diagnostics/inspect/rust",
"//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:lazy_static",
"//third_party/rust_crates:log",
"//third_party/rust_crates:maplit",
"//third_party/rust_crates:matches",
"//third_party/rust_crates:parking_lot",
"//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",
"//third_party/rust_crates:thiserror",
]
sources = [
"src/config.rs",
"src/constants.rs",
"src/file_handler.rs",
"src/inspect_server.rs",
"src/lib.rs",
"src/persist_server.rs",
]
test_deps = []
}
fuchsia_component("diagnostics-persistence-component") {
component_name = "diagnostics-persistence"
deps = [
"//src/diagnostics/config/persistence",
"//src/diagnostics/launcher:bin",
]
manifest = "meta/diagnostics-persistence.cml"
}
fuchsia_component("diagnostics-persistence-v1") {
component_name = "diagnostics-persistence"
manifest = "meta/diagnostics-persistence.cmx"
deps = [
":lib",
"//src/diagnostics/config/persistence",
"//src/diagnostics/launcher:bin",
]
}
fuchsia_package("diagnostics-persistence") {
deps = [ ":diagnostics-persistence-component" ]
}
fuchsia_unittest_package("diagnostics-persistence-tests") {
manifest = "meta/diagnostics-persistence-tests.cmx"
deps = [ ":lib_test" ]
}
group("tests") {
testonly = true
deps = [
":diagnostics-persistence-tests",
"tests:diagnostics-persistence-integration-tests",
]
}