blob: d59b345bf7841c762341462c51551f23b1078d39 [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/components.gni")
import("//build/rust/rustc_library.gni")
rustc_library("blobfs-ramdisk") {
version = "0.1.0"
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.fs:fuchsia.fs-rustc",
"//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/blobfs",
"//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:assert_matches",
"//third_party/rust_crates:maplit",
]
sources = [
"src/lib.rs",
"src/test.rs",
]
}
fuchsia_component("test-component") {
testonly = true
manifest = "meta/test_driver.cml"
deps = [
":blobfs-ramdisk_test",
":driver_test_realm",
"//src/storage/bin/blobfs",
"//src/storage/tools/blobfs-corrupt",
]
}
group("driver_test_realm") {
testonly = true
deps = [
"//sdk/lib/driver_test_realm/platform",
"//src/storage/testing:storage_drivers",
]
}
fuchsia_test_package("unit-tests-package") {
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
package_name = "blobfs-ramdisk-unit-tests"
test_components = [ ":test-component" ]
}
group("tests") {
testonly = true
public_deps = [ ":unit-tests-package" ]
}