| # Copyright 2026 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 = [ | |
| ":stacktrack-snapshot-tests", | |
| ":stacktrack_snapshot_fdomain_test($host_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") | |
| measure_tape("measure_tape_for_snapshot_element") { | |
| fidls = [ "//sdk/fidl/fuchsia.memory.stacktrack.client" ] | |
| target_binding = "rust" | |
| target_types = [ "fuchsia.memory.stacktrack.client/SnapshotElement" ] | |
| } | |
| rustc_library("stacktrack_snapshot") { | |
| sources = [ | |
| "src/lib.rs", | |
| "src/snapshot.rs", | |
| "src/streamer.rs", | |
| ] | |
| edition = "2024" | |
| visibility = [ | |
| ":*", | |
| "//src/performance/memory/stacktrack/collector:*", | |
| ] | |
| deps = [ | |
| ":measure_tape_for_snapshot_element", | |
| "//sdk/fidl/fuchsia.memory.stacktrack.client:fuchsia.memory.stacktrack.client_rust_flex", | |
| "//sdk/rust/zx-types", | |
| "//src/lib/fidl/rust/fidl", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| } | |
| rustc_library("stacktrack_snapshot_fdomain") { | |
| sources = [ | |
| "src/lib.rs", | |
| "src/snapshot.rs", | |
| "src/streamer.rs", | |
| ] | |
| features = [ "fdomain" ] | |
| edition = "2024" | |
| visibility = [ | |
| ":*", | |
| "//src/developer/ffx/plugins/profile/stacktrack/*", | |
| ] | |
| deps = [ | |
| ":measure_tape_for_snapshot_element", | |
| "//sdk/fidl/fuchsia.memory.stacktrack.client:fuchsia.memory.stacktrack.client_rust_fdomain_flex", | |
| "//sdk/rust/zx-types", | |
| "//src/lib/fdomain/client", | |
| "//src/lib/fidl/rust/fidl", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| } | |
| rustc_test("stacktrack_snapshot_test") { | |
| sources = [ | |
| "src/lib.rs", | |
| "src/snapshot.rs", | |
| "src/streamer.rs", | |
| ] | |
| edition = "2024" | |
| deps = [ | |
| ":measure_tape_for_snapshot_element", | |
| "//sdk/fidl/fuchsia.memory.stacktrack.client:fuchsia.memory.stacktrack.client_rust_flex", | |
| "//sdk/rust/zx-types", | |
| "//src/lib/fidl/rust/fidl", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:thiserror", | |
| ] + | |
| [ | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//third_party/rust_crates:test-case", | |
| ] | |
| } | |
| if (is_host) { | |
| rustc_test("stacktrack_snapshot_fdomain_test") { | |
| sources = [ | |
| "src/lib.rs", | |
| "src/snapshot.rs", | |
| "src/streamer.rs", | |
| ] | |
| edition = "2024" | |
| deps = [ | |
| ":measure_tape_for_snapshot_element", | |
| "//sdk/fidl/fuchsia.memory.stacktrack.client:fuchsia.memory.stacktrack.client_rust_fdomain_flex", | |
| "//sdk/rust/zx-types", | |
| "//src/lib/fdomain/client", | |
| "//src/lib/fidl/rust/fidl", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:thiserror", | |
| ] + | |
| [ | |
| "//src/lib/fdomain/local", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//third_party/rust_crates:test-case", | |
| ] | |
| features = [ "fdomain" ] | |
| visibility = [ | |
| ":*", | |
| "//src/performance/memory:*", | |
| ] | |
| } | |
| } | |
| fuchsia_unittest_package("stacktrack-snapshot-tests") { | |
| package_name = "stacktrack-snapshot-tests-gn" | |
| component_name = "stacktrack-snapshot-tests" | |
| deps = [ ":stacktrack_snapshot_test" ] | |
| visibility = [ | |
| ":*", | |
| "//src/performance/memory:*", | |
| ] | |
| } |