| # Copyright 2019 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/bazel/bazel_test_suite.gni") | |
| bazel_test_suite("bazel_tests") { | |
| target_tests = [ "//src/lib/diagnostics/data/rust:diagnostics-data-tests" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| ":bazel_tests", | |
| ":diagnostics-data-tests", | |
| ] | |
| } | |
| ## 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 = [] | |
| sources += [ "src/lib.rs" ] | |
| if (is_fuchsia) { | |
| sources += [ "src/logs_legacy.rs" ] | |
| } | |
| if (is_host) { | |
| features = [ "json_schema" ] | |
| } else { | |
| features = [] | |
| } | |
| crate_name = "diagnostics_data" | |
| edition = "2024" | |
| lint_config = "//build/config/rust/lints:clippy_warn_all" | |
| test_deps = [] | |
| test_deps += [ | |
| "//src/lib/fuchsia", | |
| "//third_party/rust_crates:pretty_assertions", | |
| "//third_party/rust_crates:serde_json", | |
| "//third_party/rust_crates:test-case", | |
| ] | |
| if (is_fuchsia) { | |
| test_deps += [ | |
| "//sdk/fidl/fuchsia.diagnostics.types:fuchsia.diagnostics.types_rust", | |
| ] | |
| } | |
| visibility = [ "*" ] | |
| with_unit_tests = true | |
| deps = [] | |
| deps += [ | |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust_common", | |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect_rust_common", | |
| "//src/lib/diagnostics/hierarchy/rust", | |
| "//src/lib/diagnostics/log/types:types-serde", | |
| "//src/lib/diagnostics/selectors", | |
| "//src/sys/lib/moniker", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:chrono", | |
| "//third_party/rust_crates:flyweights", | |
| "//third_party/rust_crates:itertools", | |
| "//third_party/rust_crates:serde", | |
| "//third_party/rust_crates:termion", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| if (is_fuchsia) { | |
| deps += [ | |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_rust", | |
| "//sdk/rust/zx", | |
| ] | |
| } | |
| if (is_host) { | |
| deps += [ "//third_party/rust_crates:schemars" ] | |
| } | |
| } | |
| fuchsia_unittest_package("diagnostics-data-tests") { | |
| package_name = "diagnostics-data-tests-gn" | |
| component_name = "diagnostics-data-tests" | |
| deps = [ ":lib_test" ] | |
| visibility = [ "*" ] | |
| } |