| # 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/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//src/lib/isolated_devmgr/v2_component/isolated_devmgr.gni") |
| import("//src/sys/build/fuchsia_component.gni") |
| import("//src/sys/build/fuchsia_test_package.gni") |
| |
| rustc_library("remote-block-device") { |
| with_unit_tests = true |
| edition = "2018" |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/isolated_devmgr/v2_component/rust:isolated-driver-manager", |
| "//src/lib/storage/ramdevice_client", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:linked-hash-map", |
| ] |
| |
| sources = [ |
| "src/cache.rs", |
| "src/lib.rs", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("block-client-tests-component") { |
| component_name = "block-client-tests" |
| executable_path = "bin/remote_block_device_lib_test" |
| runner = "rust_test_runner" |
| deps = [ ":remote-block-device_test" ] |
| } |
| |
| fuchsia_test_package("block-client-tests") { |
| test_components = [ ":block-client-tests-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":block-client-tests", |
| "//src/lib/isolated_devmgr/v2_component", |
| ] |
| } |