| # 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_library.gni") |
| import("//build/test/test_package.gni") |
| import("//src/lib/isolated_devmgr/devmgr_manifest.gni") |
| |
| rustc_library("ramdevice_client") { |
| with_unit_tests = true |
| edition = "2018" |
| deps = [ |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| ] |
| test_deps = [ |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:matches", |
| "//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc", |
| ] |
| non_rust_deps = [ "//zircon/system/ulib/ramdevice-client" ] |
| } |
| |
| test_package("ramdevice_client_tests") { |
| deps = [ ":ramdevice_client_test" ] |
| tests = [ |
| { |
| name = "ramdevice_client_lib_test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| devmgr_manifest("devmgr.manifest") { |
| testonly = true |
| } |
| |
| # Test component that exposes a /dev filesystem containing ramdisk support as |
| # its fuchsia.test.IsolatedDevmgr service. |
| package("ramdisk-isolated-devmgr") { |
| testonly = true |
| extra = [ "$target_gen_dir/devmgr.manifest" ] |
| deps = [ |
| ":devmgr.manifest", |
| "//src/devices/block/drivers/ramdisk", |
| "//src/lib/isolated_devmgr", |
| ] |
| |
| binaries = [ |
| { |
| name = "isolated_devmgr" |
| }, |
| ] |
| |
| loadable_modules = [ |
| { |
| name = "ramdisk.so" |
| }, |
| ] |
| |
| meta = [ |
| { |
| dest = "ramdisk-isolated-devmgr.cmx" |
| path = "meta/ramdisk-isolated-devmgr.cmx" |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":ramdevice_client_tests", |
| ":ramdisk-isolated-devmgr", |
| ] |
| } |