| # Copyright 2020 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") |
| import("//src/storage/testing/driver_test_realm.gni") |
| |
| rustc_binary("bin") { |
| output_name = "export-ffs" |
| edition = "2021" |
| deps = [ |
| ":export_ffs", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| ] |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_package("export-ffs") { |
| deps = [ ":bin" ] |
| } |
| |
| rustc_library("export_ffs") { |
| with_unit_tests = true |
| edition = "2021" |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/storage/lib/block_client/rust:remote-block-device", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:futures", |
| ] |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//src/storage/lib/ramdevice_client", |
| "//src/storage/lib/vfs/rust:vfs", |
| "//third_party/rust_crates:assert_matches", |
| ] |
| sources = [ "src/lib.rs" ] |
| } |
| |
| storage_driver_test_realm_v2_component("export-ffs-tests-component") { |
| component_name = "export-ffs-tests" |
| deps = [ ":export_ffs_test" ] |
| } |
| |
| fuchsia_test_package("export-ffs-tests") { |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| test_components = [ ":export-ffs-tests-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":export-ffs-tests" ] |
| } |