blob: 916d46747f1b699900ffbc711d8ec0f4275a985d [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_binary.gni")
import("//build/rust/rustc_test.gni")
rustc_binary("bin") {
name = "ext4_readonly"
edition = "2021"
with_unit_tests = false
deps = [
"//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-runtime",
"//src/storage/ext4/lib/parser",
"//src/storage/lib/vfs/rust:vfs",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:log",
]
sources = [ "src/main.rs" ]
}
rustc_test("ext4_server_integration_test") {
source_root = "tests/ext4_server_test.rs"
edition = "2021"
deps = [
"//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/rust/zx",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component-test",
"//src/lib/fuchsia-fs",
"//src/storage/lib/block_server:vmo_backed_block_server",
"//src/storage/lib/vfs/rust:vfs",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:hex",
"//third_party/rust_crates:maplit",
"//third_party/rust_crates:sha2",
"//third_party/rust_crates:test-case",
]
data_deps = [ ":bin" ]
sources = [ "tests/ext4_server_test.rs" ]
}
fuchsia_component("ext4_readonly_comp") {
component_name = "ext4_readonly"
manifest = "meta/ext4_readonly.cml"
deps = [ ":bin" ]
}
fuchsia_package("ext4_readonly") {
deps = [ ":ext4_readonly_comp" ]
}
fuchsia_unittest_component("ext4_server_integration_test_component") {
component_name = "ext4_readonly_integration_test"
deps = [ ":ext4_server_integration_test" ]
}
resource("ext4_server_integration_test_data") {
testonly = true
sources = [
"../read-only/test_files/1file.img",
"../read-only/test_files/extents.img",
"../read-only/test_files/nest.img",
]
outputs = [ "data/{{source_file_part}}" ]
}
fuchsia_test_package("ext4_server_integration_tests") {
test_components = [ ":ext4_server_integration_test_component" ]
deps = [
":ext4_readonly_comp",
":ext4_server_integration_test_data",
]
}
group("tests") {
testonly = true
deps = [ ":ext4_server_integration_tests" ]
}