blob: 564705ae69376eaf4cd823213cff0909538f6eaf [file] [log] [blame]
# 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("//src/lib/isolated_devmgr/isolated_devmgr.gni")
import("//src/sys/build/components.gni")
rustc_library("ramdevice_client") {
with_unit_tests = true
edition = "2018"
deps = [
"//src/lib/fdio/rust:fdio",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
]
test_deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:matches",
]
non_rust_deps = [ "//zircon/system/ulib/ramdevice-client" ]
sources = [
"src/lib.rs",
"src/ramdevice_sys.rs",
]
}
fuchsia_component("ramdevice-client-tests") {
testonly = true
manifest = "meta/ramdevice_client_lib_test.cmx"
deps = [
":ramdevice_client_test",
":ramdisk-isolated-devmgr-component",
]
}
fuchsia_test_package("ramdevice-client-tests-package") {
package_name = "ramdevice-client-tests"
test_components = [ ":ramdevice-client-tests" ]
}
# Test component that exposes a /dev filesystem containing ramdisk support as
# its fuchsia.test.IsolatedDevmgr service.
isolated_devmgr_component("ramdisk-isolated-devmgr-component") {
component_name = "ramdisk-isolated-devmgr"
args = [
"--svc_name=fuchsia.test.IsolatedDevmgr",
"--load_driver=/boot/driver/ramdisk.so",
"--wait_for=misc/ramctl",
]
deps = [
"//src/devices/block/drivers/core",
"//src/devices/block/drivers/ftl",
"//src/devices/block/drivers/gpt",
"//src/devices/block/drivers/mbr",
"//src/devices/block/drivers/ramdisk",
"//src/devices/tests/sysdev",
"//src/storage/fvm/driver",
]
}
fuchsia_package("ramdisk-isolated-devmgr") {
testonly = true
deps = [ ":ramdisk-isolated-devmgr-component" ]
}
group("tests") {
testonly = true
deps = [ ":ramdevice-client-tests-package" ]
}