blob: 50ca7e43a62d3f0784b182bf3c1e12afb7a0f1f6 [file] [log] [blame]
# Copyright 2023 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_binary.gni")
import("//build/rust/rustc_library.gni")
rustc_library("lib") {
name = "stressor_lib"
with_unit_tests = true
edition = "2021"
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//src/lib/fdio/rust:fdio",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:tracing",
]
sources = [
"src/aggressive.rs",
"src/gentle.rs",
"src/lib.rs",
]
}
rustc_binary("stressor_bin") {
output_name = "stressor"
edition = "2021"
deps = [
":lib",
"//src/lib/diagnostics/log/rust",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tracing",
]
sources = [ "src/main.rs" ]
}
fuchsia_component("stressor_component") {
component_name = "storage_stressor"
deps = [ ":stressor_bin" ]
manifest = "meta/stressor.cml"
}
fuchsia_package("stressor_package") {
package_name = "storage_stressor"
deps = [ ":stressor_component" ]
}
group("stressor") {
deps = [ ":stressor_package" ]
}
fuchsia_unittest_package("stressor-test") {
deps = [ ":lib_test" ]
}
group("tests") {
testonly = true
deps = [ ":stressor-test" ]
}