blob: 178ffe13a2a9b2d22e818ed3e2b9256b00e01dce [file] [log] [blame]
# Copyright 2021 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("//src/developer/ffx/build/ffx_plugin.gni")
ffx_plugin("ffx_storage_blackout_blobfs_checkerboard") {
version = "0.1.0"
edition = "2021"
args_sources = [ "src/args.rs" ]
sources = [ "src/lib.rs" ]
deps = [ "//tools/blackout/blackout-host" ]
}
rustc_binary("blackout-blobfs-checkerboard-target-bin") {
output_name = "blackout_blobfs_checkerboard_target_bin"
testonly = true
edition = "2021"
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-fs",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/storage/blackout/target/lib:blackout-target",
"//src/storage/lib/fs_management/rust:fs_management",
"//src/sys/pkg/lib/fuchsia-merkle",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:tracing",
]
source_root = "src/target.rs"
sources = [ "src/target.rs" ]
}
fuchsia_component("blackout-blobfs-checkerboard-target-component") {
testonly = true
deps = [ ":blackout-blobfs-checkerboard-target-bin" ]
manifest = "meta/blackout_blobfs_checkerboard_target.cml"
}
fuchsia_package("blackout-blobfs-checkerboard-target") {
testonly = true
deps = [
":blackout-blobfs-checkerboard-target-component",
"//src/storage/blobfs/bin:blobfs-component",
]
}
if (is_host) {
host_test("blackout-blobfs-checkerboard-host") {
binary_path = "$root_out_dir/ffx"
args = [
"--config",
"storage_dev=true",
"storage",
"blackout",
"blobfs-checkerboard",
"--bootserver",
"--dmc-reboot",
]
deps = [ "//src/developer/ffx:ffx_bin" ]
environments = [
{
dimensions = {
testbed = "pwr_sherlock"
pool = "fuchsia.tests.power-failure"
device_type = "Sherlock"
}
tags = [ "power-failure-sherlock" ]
netboot = true
},
]
}
}
group("blobfs-checkerboard") {
testonly = true
deps = [ ":blackout-blobfs-checkerboard-target" ]
}
group("integration") {
testonly = true
deps = [
":blackout-blobfs-checkerboard-host($host_toolchain)",
":blackout-blobfs-checkerboard-target",
]
}