blob: d4c53759b554b1f90c4780be2d71c1eab0d11747 [file]
# 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.
group("tests") {
testonly = true
deps = [ ":log-command-test-package" ]
}
## 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")
_COMMON_SRCS = [
"src/filter.rs",
"src/fxt_streamer.rs",
"src/lib.rs",
"src/log_formatter.rs",
"src/log_socket_stream.rs",
]
# To avoid "Assignment had no effect" from GN.
# It's possible this variable is only used in if conditions (e.g. is_host).
not_needed([ "_COMMON_SRCS" ])
_COMMON_DEPS = [
"//sdk/rust/zx-types",
"//src/developer/ffx/lib/errors:lib",
"//src/developer/lib/writer:lib",
"//src/lib/diagnostics/data/rust",
"//src/lib/diagnostics/log/encoding/rust",
"//src/lib/diagnostics/log/message/rust:lib",
"//src/lib/diagnostics/selectors",
"//src/lib/fidl/rust/fidl",
"//src/sys/lib/moniker",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:async-stream",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:chrono-english",
"//third_party/rust_crates:flyweights",
"//third_party/rust_crates:futures-util",
"//third_party/rust_crates:log",
"//third_party/rust_crates:regex-lite",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:zerocopy",
]
# To avoid "Assignment had no effect" from GN.
# It's possible this variable is only used in if conditions (e.g. is_host).
not_needed([ "_COMMON_DEPS" ])
rustc_library("log-command") {
sources = _COMMON_SRCS
edition = "2024"
lint_config = "//build/config/rust/lints:clippy_warn_all"
visibility = [
":*",
"//src/diagnostics/log_listener:*",
"//src/lib/test_diagnostics/rust:*",
]
deps = _COMMON_DEPS + [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust_flex",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust_flex",
"//src/lib/fdomain/client:flex_fidl",
"//src/sys/lib/component_debug",
]
}
rustc_library("log-command-ctf") {
sources = _COMMON_SRCS
features = [ "ctf" ]
edition = "2024"
lint_config = "//build/config/rust/lints:clippy_warn_all"
visibility = [
":*",
"//src/diagnostics/archivist/tests/integration/test_cases:*",
]
deps = _COMMON_DEPS + [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust_flex",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust_flex",
"//src/lib/fdomain/client:flex_fidl",
]
}
rustc_library("log-command_fdomain") {
sources = _COMMON_SRCS
features = [ "fdomain" ]
edition = "2024"
lint_config = "//build/config/rust/lints:clippy_warn_all"
visibility = [
":*",
"//src/developer/ffx/plugins/component/run:*",
"//src/developer/ffx/plugins/log/*",
"//src/lib/test_diagnostics/rust:*",
]
deps =
_COMMON_DEPS + [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust_fdomain_flex",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust_fdomain_flex",
"//src/lib/fdomain/client:flex_fdomain",
"//src/sys/lib/component_debug:component_debug_fdomain",
]
}
if (is_fuchsia) {
rustc_test("log-command_test") {
sources = _COMMON_SRCS
edition = "2024"
deps = _COMMON_DEPS + [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust_flex",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust_flex",
"//src/lib/fdomain/client:flex_fidl",
"//src/sys/lib/component_debug",
] +
[
"//sdk/rust/zx",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
]
output_name = "log_command_lib_test"
}
}
fuchsia_component_manifest("log-command-test-manifest") {
testonly = true
component_name = "log-command-test"
manifest = "meta/log-command-test.cml"
}
fuchsia_test_component("log-command-test-component") {
cm_label = ":log-command-test-manifest"
deps = [ ":log-command_test" ]
}
fuchsia_test_package("log-command-test-package") {
package_name = "log-command-test-gn"
test_components = [ ":log-command-test-component" ]
}