| # 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/config.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| rustc_library("ext4-read-only") { |
| name = "ext4-read-only" |
| version = "0.1.0" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/storage/vfs/rust:vfs", |
| "//src/lib/storage/vfs/rust/macros", |
| "//src/lib/zerocopy", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:rust-crypto", |
| "//third_party/rust_crates:static_assertions", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ |
| "src/lib.rs", |
| "src/parser.rs", |
| "src/readers.rs", |
| "src/structs.rs", |
| ] |
| } |
| |
| test_package("ext4-read-only-tests") { |
| deps = [ ":ext4-read-only_test" ] |
| |
| resources = [ |
| { |
| path = "test_files/1file.img" |
| dest = "1file.img" |
| }, |
| { |
| path = "test_files/nest.img" |
| dest = "nest.img" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "ext4_read_only_lib_test" |
| dest = "ext4_read_only_test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":ext4-read-only-tests" ] |
| } |