blob: 2b284790ab96a849d27eb91b00bace377e8de716 [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/config.gni")
import("//build/dist/resource.gni")
import("//build/rust/rustc_library.gni")
rustc_library("ext4-read-only") {
name = "ext4-read-only"
version = "0.1.0"
with_unit_tests = true
edition = "2021"
deps = [
"//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_rust",
"//sdk/fidl/fuchsia.mem:fuchsia.mem_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/storage/block_client/rust:remote-block-device",
"//src/lib/storage/vfs/rust:vfs",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:once_cell",
"//third_party/rust_crates:static_assertions",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tracing",
"//third_party/rust_crates:zerocopy",
]
test_deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates:hex",
"//third_party/rust_crates:maplit",
"//third_party/rust_crates:sha2",
"//third_party/rust_crates:test-case",
]
sources = [
"src/lib.rs",
"src/parser.rs",
"src/readers.rs",
"src/structs.rs",
]
}
resource("test-images") {
sources = [
"test_files/1file.img",
"test_files/extents.img",
"test_files/longdir.img",
"test_files/nest.img",
]
outputs = [ "data/{{source_file_part}}" ]
}
fuchsia_unittest_package("ext4-read-only-tests") {
deps = [
":ext4-read-only_test",
":test-images",
]
}
group("tests") {
testonly = true
public_deps = [ ":ext4-read-only-tests" ]
}