| # 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("//src/storage/testing/driver_test_realm.gni") |
| |
| rustc_binary("bin") { |
| name = "fatfs_mounter" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.fs:fuchsia.fs_rust", |
| "//sdk/fidl/fuchsia.hardware.block.partition:fuchsia.hardware.block.partition_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/storage/fuchsia-fatfs:lib", |
| "//src/storage/lib/block_client/rust:remote-block-device", |
| "//src/storage/lib/vfs/rust:vfs", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_rust", |
| "//src/lib/fuchsia-async", |
| "//src/storage/lib/ramdevice_client", |
| "//third_party/rust_crates:fatfs", |
| ] |
| |
| sources = [ |
| "src/device.rs", |
| "src/main.rs", |
| ] |
| } |
| |
| fuchsia_component("fatfs-mounter") { |
| deps = [ ":bin" ] |
| manifest = "meta/fatfs_mounter.cml" |
| } |
| |
| storage_driver_test_realm_v2_component("fatfs-mounter-test") { |
| deps = [ ":bin_test" ] |
| } |
| |
| fuchsia_test_package("fatfs-mounter-tests") { |
| test_specs = { |
| # This test fails when test cases are executed in parallel. |
| parallel = 1 |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| test_components = [ ":fatfs-mounter-test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fatfs-mounter-tests" ] |
| } |