| # 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/sys/build/components.gni") |
| |
| rustc_library("pkgfs-ramdisk") { |
| version = "0.1.0" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/scoped_task", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/pkg/lib/fuchsia-merkle", |
| "//src/sys/pkg/testing/blobfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//src/sys/pkg/lib/fuchsia-pkg", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| fuchsia_component("pkgfs-ramdisk-lib-test") { |
| testonly = true |
| manifest = "meta/pkgfs-ramdisk-lib-test.cmx" |
| deps = [ ":pkgfs-ramdisk_test" ] |
| } |
| |
| fuchsia_test_package("pkgfs-ramdisk-tests") { |
| test_components = [ ":pkgfs-ramdisk-lib-test" ] |
| deps = [ |
| "//src/storage/bin/blobfs", |
| "//src/sys/pkg/bin/pkgfs:pkgsvr", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":pkgfs-ramdisk-tests", |
| "//src/lib/storage/ramdevice_client:ramdisk-isolated-devmgr", |
| ] |
| } |