| # Copyright 2022 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") |
| import("//src/storage/testing/driver_test_realm.gni") |
| |
| rustc_library("framework") { |
| edition = "2021" |
| testonly = true |
| name = "storage_benchmarks" |
| sources = [ |
| "src/block_device.rs", |
| "src/directory_benchmarks.rs", |
| "src/filesystem.rs", |
| "src/io_benchmarks.rs", |
| "src/lib.rs", |
| "src/testing.rs", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.device:fuchsia.device_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//src/performance/lib/fuchsiaperf", |
| "//src/storage/lib/trace", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:libc", |
| "//third_party/rust_crates:prettytable-rs", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:rand_xorshift", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:tracing", |
| ] |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//src/sys/test_runners:tmp_storage", |
| ] |
| with_unit_tests = true |
| } |
| |
| fuchsia_unittest_package("storage-benchmarks-framework-tests") { |
| deps = [ ":framework_test" ] |
| } |
| |
| group("benchmarks") { |
| testonly = true |
| deps = [ |
| "fuchsia:benchmark-packages", |
| "host:benchmarks", |
| "starnix:benchmark-packages", |
| "verity:benchmark-packages", |
| ] |
| |
| # TODO(b/297312145): Remove when Starnix can be built on RISC-V. |
| if (current_cpu == "riscv64") { |
| deps -= [ "starnix:benchmark-packages" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":storage-benchmarks-framework-tests", |
| "fuchsia:tests", |
| ] |
| } |