| # 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. |
| |
| import("//build/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("log-command") { |
| version = "0.1.0" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//src/developer/ffx/lib/errors:lib", |
| "//src/developer/ffx/lib/writer:lib", |
| "//src/lib/diagnostics/data/rust", |
| "//src/lib/diagnostics/selectors", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/zircon/rust:fuchsia-zircon-types", |
| "//src/sys/lib/component_debug", |
| "//src/sys/lib/moniker", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:async-stream", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:chrono-english", |
| "//third_party/rust_crates:futures-util", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:assert_matches", |
| ] |
| |
| sources = [ |
| "src/filter.rs", |
| "src/lib.rs", |
| "src/log_formatter.rs", |
| "src/log_socket_stream.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("log-command-test-package") { |
| deps = [ ":log-command_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":log-command-test-package" ] |
| } |