| # Copyright 2019 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/rust/rustc_binary.gni") |
| import("//src/sys/build/components.gni") |
| |
| if (host_toolchain == current_toolchain) { |
| rustc_binary("blobfs-fsck-soft-host") { |
| testonly = true |
| edition = "2018" |
| deps = [ |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:structopt", |
| "//tools/blackout/blackout-host", |
| ] |
| source_root = "src/host.rs" |
| with_unit_tests = true |
| test_environments = [ |
| { |
| dimensions = { |
| device_type = "Astro" |
| } |
| tags = [ "power-failure" ] |
| netboot = true |
| }, |
| ] |
| |
| sources = [ "src/host.rs" ] |
| } |
| } |
| |
| rustc_binary("blobfs-fsck-soft-target-bin") { |
| with_unit_tests = true |
| testonly = true |
| edition = "2018" |
| deps = [ |
| "//src/lib/cstr", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/scoped_task", |
| "//src/lib/storage/fs_management", |
| "//src/lib/storage/ramdevice_client", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:structopt", |
| "//tools/blackout/blackout-target", |
| ] |
| source_root = "src/target.rs" |
| |
| sources = [ "src/target.rs" ] |
| } |
| |
| fuchsia_component("blobfs-fsck-soft-target-component") { |
| testonly = true |
| deps = [ |
| ":blobfs-fsck-soft-target-bin", |
| "//src/storage/bin/blobfs", |
| "//src/storage/blobfs/test:blobfs-load-generator", |
| ] |
| manifest = "meta/blobfs_fsck_soft_target.cmx" |
| } |
| |
| fuchsia_package("blobfs-fsck-soft-target") { |
| testonly = true |
| deps = [ ":blobfs-fsck-soft-target-component" ] |
| } |
| |
| fuchsia_component("blobfs-fsck-soft-target-test-component") { |
| testonly = true |
| deps = [ |
| ":blobfs-fsck-soft-target-bin_test", |
| "//src/storage/bin/blobfs", |
| "//src/storage/blobfs/test:blobfs-load-generator", |
| ] |
| manifest = "meta/blobfs_fsck_soft_target_bin_bin_test.cmx" |
| } |
| |
| fuchsia_test_package("blobfs-fsck-soft-target-test") { |
| test_components = [ ":blobfs-fsck-soft-target-test-component" ] |
| deps = [ |
| ":blobfs-fsck-soft-target-test-component", |
| "//src/lib/storage/ramdevice_client:ramdisk-isolated-devmgr-component", |
| ] |
| } |
| |
| group("blobfs-fsck-soft") { |
| testonly = true |
| public_deps = [ |
| ":blobfs-fsck-soft-host($host_toolchain)", |
| ":blobfs-fsck-soft-target", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":blobfs-fsck-soft-target-test" ] |
| } |
| |
| group("integration") { |
| testonly = true |
| public_deps = [ |
| ":blobfs-fsck-soft-host_test($host_toolchain)", |
| ":blobfs-fsck-soft-target", |
| "//garnet/packages/prod:run", |
| ] |
| } |