blob: 48131c5a1bfc7470e5557bc10684ab6f18c75af4 [file] [log] [blame]
# Copyright 2021 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") {
name = "blobfs"
with_unit_tests = true
edition = "2021"
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-fs",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/pkg/lib/fuchsia-hash",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:openat",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//src/sys/pkg/lib/fuchsia-merkle",
"//src/sys/pkg/testing/blobfs-ramdisk",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:maplit",
"//third_party/rust_crates:rand",
]
sources = [
"src/blob.rs",
"src/lib.rs",
"src/mock.rs",
]
}
fuchsia_unittest_package("blobfs-lib-tests") {
manifest = "meta/blobfs-lib-test.cml"
deps = [
":blobfs_test",
"//sdk/lib/driver_test_realm/platform",
"//src/lib/storage/ramdevice_client:ramdisk-isolated-devmgr-component",
"//src/storage/bin/blobfs",
]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
public_deps = [ ":blobfs-lib-tests" ]
}