| # 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/rust/rustc_test.gni") | |
| # Uses current_build_target_api_level from | |
| # import("//build/config/fuchsia/target_api_level.gni"). | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| ":diagnostics-reader-tests", | |
| "tests", | |
| ] | |
| } | |
| # Kept in GN because `diagnostics-reader-tests` packages | |
| # `//src/diagnostics/archivist:archivist-for-embedding-bundle` and | |
| # `//src/lib/diagnostics/inspect/runtime/rust:inspect_test_component_default`, | |
| # neither of which has a Bazel target yet. | |
| rustc_test("lib_test") { | |
| edition = "2024" | |
| output_name = "diagnostics_reader_lib_test" | |
| deps = [ | |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust", | |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem_rust", | |
| "//sdk/rust/zx", | |
| "//src/lib/diagnostics/data/rust", | |
| "//src/lib/diagnostics/hierarchy/rust", | |
| "//src/lib/diagnostics/log/message/rust", | |
| "//src/lib/diagnostics/log/rust", | |
| "//src/lib/diagnostics/selectors", | |
| "//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//src/lib/fuchsia-component-test", | |
| "//src/sys/lib/cm_rust", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:assert_matches", | |
| "//third_party/rust_crates:async-stream", | |
| "//third_party/rust_crates:ciborium", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:log", | |
| "//third_party/rust_crates:pin-project", | |
| "//third_party/rust_crates:serde", | |
| "//third_party/rust_crates:serde_json", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| if (current_build_target_api_level == "PLATFORM" || | |
| current_build_target_api_level == "HEAD") { | |
| deps += [ "//src/lib/fuchsia-sync" ] | |
| } | |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] | |
| sources = [ "src/lib.rs" ] | |
| } | |
| fuchsia_unittest_package("diagnostics-reader-tests") { | |
| manifest = "meta/diagnostics-reader-unittest.cml" | |
| deps = [ | |
| ":lib_test", | |
| "//src/diagnostics/archivist:archivist-for-embedding-bundle", | |
| "//src/lib/diagnostics/inspect/runtime/rust:inspect_test_component_default", | |
| ] | |
| } | |
| ## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ## | |
| # | |
| # ________ _________ ________ ________ | |
| # |\ ____\|\___ ___\\ __ \|\ __ \ | |
| # \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \ | |
| # \ \_____ \ \ \ \ \ \ \\\ \ \ ____\ | |
| # \|____|\ \ \ \ \ \ \ \\\ \ \ \___| | |
| # ____\_\ \ \ \__\ \ \_______\ \__\ | |
| # |\_________\ \|__| \|_______|\|__| | |
| # \|_________| | |
| # | |
| # | |
| # AUTO-GENERATED - DO NOT EDIT | |
| # | |
| # The targets below are auto-generated based on the targets defined in the | |
| # BUILD.bazel file from the same directory. If you made changes to targets in | |
| # Bazel, instead of editing this file manually, run: | |
| # | |
| # > fx bazel2gn | |
| # | |
| # Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and | |
| # rerun bazel2gn. | |
| import("//build/tools/bazel2gn/bazel_migration.gni") | |
| group("rust") { | |
| public_deps = [ ":lib" ] | |
| visibility = [ "//*" ] | |
| } | |
| rustc_library("lib") { | |
| sources = [ "src/lib.rs" ] | |
| crate_name = "diagnostics_reader" | |
| edition = "2024" | |
| lint_config = "//build/config/rust/lints:clippy_warn_all" | |
| visibility = [ | |
| ":*", | |
| "//src/devices/usb/bin/usb-cli:*", | |
| "//src/sys/component_manager/tests/boot:*", | |
| "//tools/fidl/example-tester:*", | |
| ] | |
| deps = [] | |
| deps += [ | |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust", | |
| "//sdk/rust/zx", | |
| "//src/lib/diagnostics/data/rust", | |
| "//src/lib/diagnostics/hierarchy/rust", | |
| "//src/lib/diagnostics/log/message/rust", | |
| "//src/lib/diagnostics/selectors", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:async-stream", | |
| "//third_party/rust_crates:ciborium", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:pin-project", | |
| "//third_party/rust_crates:serde", | |
| "//third_party/rust_crates:serde_json", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| if (current_build_target_api_level == "PLATFORM" || | |
| current_build_target_api_level == "HEAD") { | |
| deps += [ "//src/lib/fuchsia-sync" ] | |
| } | |
| } |