| # 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") |
| import("//build/rust/rustc_library.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":starnix-tracefs-tests" ] |
| } |
| |
| rustc_library("tracefs") { |
| name = "starnix-modules-tracefs" |
| edition = "2021" |
| version = "0.1.0" |
| source_root = "lib.rs" |
| with_unit_tests = true |
| |
| sources = [ |
| "event.rs", |
| "fs.rs", |
| "lib.rs", |
| "tracing_directory.rs", |
| ] |
| |
| # TODO(https://fxbug.dev/42059075): Re-enable starnix in these environments. |
| exclude_toolchain_tags = [ |
| "asan", |
| "hwasan", |
| ] |
| |
| configs += [ "//src/starnix/config:starnix_clippy_lints" ] |
| |
| deps = [ |
| "//sdk/rust/zx", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/shared-buffer", |
| "//src/lib/trace/rust:trace", |
| "//src/starnix/kernel:starnix_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:zerocopy", |
| ] |
| |
| test_deps = [ "//src/lib/fuchsia" ] |
| } |
| |
| fuchsia_unittest_package("starnix-tracefs-tests") { |
| manifest = "meta/starnix_tracefs_tests.cml" |
| deps = [ ":tracefs_test" ] |
| test_specs = { |
| log_settings = { |
| # Tests exercise failure cases, so ERROR logs are expected. |
| max_severity = "ERROR" |
| } |
| } |
| test_type = "starnix" |
| } |