blob: 37cdbad2cf867fc8ff5bd99b80b9e9cc35cdb250 [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/bazel/bazel_test_suite.gni")
bazel_test_suite("bazel_tests") {
target_tests = [ "//src/starnix/modules/functionfs:starnix-functionfs-tests" ]
}
group("tests") {
testonly = true
deps = [ ":starnix-functionfs-tests-package" ]
# TODO(https://fxbug.dev/42059075): Re-enable starnix in these environments.
# The GN copy's test binary is excluded from asan/hwasan variants with
# exclude_toolchain_tags, which Bazel ignores.
if (!is_asan) {
deps += [ ":bazel_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")
rustc_library("functionfs") {
sources = [ "lib.rs" ]
crate_name = "starnix_modules_functionfs"
source_root = "lib.rs"
edition = "2024"
lint_config = "//src/starnix/build:kernel_library_config"
visibility = [
":*",
"//src/starnix/modules:*",
]
deps = [
"//sdk/fidl/fuchsia.hardware.adb:fuchsia.hardware.adb_rust",
"//sdk/rust/zx",
"//src/lib/diagnostics/inspect/rust:fuchsia-inspect",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/starnix/kernel/core",
"//src/starnix/lib/starnix_logging",
"//src/starnix/lib/starnix_sync",
"//src/starnix/lib/starnix_types",
"//src/starnix/lib/starnix_uapi",
"//third_party/rust_crates:async-channel",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:futures-util",
"//third_party/rust_crates:zerocopy",
]
}
rustc_test("functionfs_test") {
sources = [ "lib.rs" ]
source_root = "lib.rs"
edition = "2024"
deps = [
"//sdk/fidl/fuchsia.hardware.adb:fuchsia.hardware.adb_rust",
"//sdk/rust/zx",
"//src/lib/diagnostics/inspect/rust:fuchsia-inspect",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/starnix/kernel/core",
"//src/starnix/lib/starnix_logging",
"//src/starnix/lib/starnix_sync",
"//src/starnix/lib/starnix_types",
"//src/starnix/lib/starnix_uapi",
"//third_party/rust_crates:async-channel",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:futures-util",
"//third_party/rust_crates:zerocopy",
] + [
"//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions",
"//src/lib/fuchsia",
]
output_name = "starnix_modules_functionfs_lib_test"
lint_config = "//src/starnix/config:starnix_clippy_lints_test"
exclude_toolchain_tags = [
"asan",
"hwasan",
]
}
fuchsia_component_manifest("starnix-functionfs-tests-manifest") {
testonly = true
component_name = "starnix-functionfs-tests"
manifest = "meta/starnix_functionfs_tests.cml"
}
fuchsia_test_component("starnix-functionfs-tests-component") {
cm_label = ":starnix-functionfs-tests-manifest"
test_type = "starnix"
deps = [
":functionfs_test",
"//src/starnix/kernel/vdso",
]
}
fuchsia_test_package("starnix-functionfs-tests-package") {
package_name = "starnix-functionfs-tests-gn"
test_components = [ ":starnix-functionfs-tests-component" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}