blob: 33bb1bf2abc64187b20807133929f3f1f9f0bbf2 [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/package.gni")
import("//build/rust/rustc_library.gni")
import("//src/sys/build/components.gni")
rustc_library("blobfs-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-component",
"//src/lib/fuchsia-runtime",
"//src/lib/scoped_task",
"//src/lib/storage/ramdevice_client",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/pkg/lib/fuchsia-merkle",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:openat",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//src/lib/storage/ramdevice_client",
"//third_party/rust_crates:maplit",
"//third_party/rust_crates:matches",
]
sources = [
"src/lib.rs",
"src/test.rs",
]
}
fuchsia_component("unit-tests-root") {
testonly = true
component_name = "test_root"
manifest = "meta/test_root.cml"
}
fuchsia_component("unit-tests-driver") {
testonly = true
component_name = "test_driver"
manifest = "meta/test_driver.cml"
deps = [
":blobfs-ramdisk_test",
"//src/storage/bin/blobfs",
"//src/storage/blobfs-corrupt",
]
}
fuchsia_test_package("unit-tests-package") {
package_name = "blobfs-ramdisk-unit-tests"
test_components = [ ":unit-tests-root" ]
deps = [ ":unit-tests-driver" ]
}
group("tests") {
testonly = true
public_deps = [ ":unit-tests-package" ]
}