blob: a52decf3362995b5d05418ac7b639ea6ce7079a6 [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")
import("//build/testing/environments.gni")
rustc_library("fuchsia-bootfs") {
name = "fuchsia_bootfs"
edition = "2021"
with_unit_tests = true
deps = [
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:zerocopy",
]
test_deps = [
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:lazy_static",
]
sources = [
"src/bootfs.rs",
"src/lib.rs",
]
}
resource("testdata_bootfs") {
sources = [ "testdata/basic.bootfs.uncompressed" ]
outputs = [ "data/basic.bootfs.uncompressed" ]
}
resource("testdata_golden_subdir") {
sources = [
"testdata/input/dir/empty",
"testdata/input/dir/lorem.txt",
]
outputs = [ "data/golden/dir/{{source_file_part}}" ]
}
resource("testdata_golden_root") {
sources = [
"testdata/input/empty",
"testdata/input/random.dat",
"testdata/input/simple.txt",
]
outputs = [ "data/golden/{{source_file_part}}" ]
}
fuchsia_unittest_package("fuchsia-bootfs-tests") {
deps = [
":fuchsia-bootfs_test",
":testdata_bootfs",
":testdata_golden_root",
":testdata_golden_subdir",
]
}