blob: f1c887aa3948ca8f9c6eba5ad271cffb7e52aa54 [file]
# Copyright 2024 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")
fuchsia_unittest_package("logging_rust_cpp_bridge_tests") {
package_name = "logging_rust_cpp_bridge_tests-gn"
component_name = "logging_rust_cpp_bridge_tests"
manifest = "meta/tests.cml"
deps = [ ":logging_rust_cpp_bridge_test" ]
# These tests use a single instance of archivist, and since they set
# up conflicting test cases, they can not run in parallel.
test_specs = {
parallel = 1
log_settings = {
# These tests intentionally generate error messages.
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
deps = [ ":logging_rust_cpp_bridge_tests($default_toolchain)" ]
}
## 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")
source_set("cpp_syslog_wrapper") {
sources = [ "wrapper.cc" ]
deps = [ "//sdk/lib/syslog/cpp" ]
}
rustc_library("rust_cpp_bridge") {
sources = [ "src/lib.rs" ]
crate_name = "logging_rust_cpp_bridge"
edition = "2024"
link_deps = [ ":cpp_syslog_wrapper" ]
visibility = [
":*",
"//src/developer/ffx/lib/profiler:*",
"//src/developer/ffx/lib/symbolize/tests:*",
]
deps = [ "//third_party/rust_crates:log" ]
}
source_set("cpp_syslog_test_wrapper") {
sources = [ "test_wrapper.cc" ]
deps = [ "//sdk/lib/syslog/cpp" ]
}
if (is_fuchsia) {
rustc_test("logging_rust_cpp_bridge_test") {
sources = [ "src/lib.rs" ]
edition = "2024"
link_deps = [ ":cpp_syslog_wrapper" ] + [ ":cpp_syslog_test_wrapper" ]
deps = [ "//third_party/rust_crates:log" ] + [
"//src/lib/diagnostics/reader/rust",
"//src/lib/fuchsia",
"//third_party/rust_crates:futures",
]
configs += [ "//build/config/fuchsia:dynamic_cpp_standard_library" ]
}
}