| # Copyright 2023 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/testing/host_test_data.gni") | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":sparse-test-package" ] | |
| } | |
| if (is_linux) { | |
| host_test_data("simg2img_sources") { | |
| sources = [ | |
| "//prebuilt/third_party/libsparse/bin/simg2img", | |
| "//prebuilt/third_party/libsparse/lib64/libc++.so", | |
| ] | |
| deps = [] | |
| outputs = | |
| [ "${root_out_dir}/test_data/storage/sparse/{{source_file_part}}" ] | |
| } | |
| } | |
| ## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ## | |
| # | |
| # ________ _________ ________ ________ | |
| # |\ ____\|\___ ___\\ __ \|\ __ \ | |
| # \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \ | |
| # \ \_____ \ \ \ \ \ \ \\\ \ \ ____\ | |
| # \|____|\ \ \ \ \ \ \ \\\ \ \ \___| | |
| # ____\_\ \ \ \__\ \ \_______\ \__\ | |
| # |\_________\ \|__| \|_______|\|__| | |
| # \|_________| | |
| # | |
| # | |
| # AUTO-GENERATED - DO NOT EDIT | |
| # | |
| # The targets below are auto-generated based on the targets defined in the | |
| # BUILD.bazel file from the same directory. If you made changes to targets in | |
| # Bazel, instead of editing this file manually, run: | |
| # | |
| # > fx bazel2gn | |
| # | |
| # Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and | |
| # rerun bazel2gn. | |
| import("//build/tools/bazel2gn/bazel_migration.gni") | |
| rustc_library("lib") { | |
| sources = [ | |
| "src/builder.rs", | |
| "src/format.rs", | |
| "src/lib.rs", | |
| "src/reader.rs", | |
| ] | |
| crate_name = "sparse" | |
| edition = "2024" | |
| version = "0.1.0" | |
| visibility = [ | |
| ":*", | |
| "//src/developer/ffx/lib/fastboot:*", | |
| "//src/developer/ffx/lib/fastboot/interface:*", | |
| "//src/developer/ffx/plugins/emulator/engines:*", | |
| "//src/developer/ffx/plugins/target/fastboot:*", | |
| "//src/storage/ext4/lib/ext4_extract:*", | |
| "//src/storage/fxfs/make-blob-image:*", | |
| "//src/storage/fxfs/tools:*", | |
| "//tools/make-fuchsia-vol:*", | |
| ] | |
| deps = [] | |
| deps += [ | |
| "//third_party/rust_crates:bincode", | |
| "//third_party/rust_crates:byteorder", | |
| "//third_party/rust_crates:log", | |
| "//third_party/rust_crates:serde", | |
| "//third_party/rust_crates:static_assertions", | |
| "//third_party/rust_crates:tempfile", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| if (is_fuchsia) { | |
| deps += [ "//sdk/rust/zx" ] | |
| } | |
| } | |
| if (is_fuchsia) { | |
| rustc_test("sparse_lib_test") { | |
| sources = [ | |
| "src/builder.rs", | |
| "src/format.rs", | |
| "src/lib.rs", | |
| "src/reader.rs", | |
| ] | |
| edition = "2024" | |
| deps = [] | |
| deps += [ | |
| "//third_party/rust_crates:bincode", | |
| "//third_party/rust_crates:byteorder", | |
| "//third_party/rust_crates:log", | |
| "//third_party/rust_crates:serde", | |
| "//third_party/rust_crates:static_assertions", | |
| "//third_party/rust_crates:tempfile", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| if (is_fuchsia) { | |
| deps += [ "//sdk/rust/zx" ] | |
| } | |
| deps += [ "//third_party/rust_crates:rand" ] | |
| testonly = true | |
| } | |
| } | |
| fuchsia_component_manifest("sparse-test-manifest") { | |
| testonly = true | |
| component_name = "sparse-test" | |
| manifest = "meta/sparse_test.cml" | |
| } | |
| fuchsia_test_component("sparse-test-component") { | |
| cm_label = ":sparse-test-manifest" | |
| deps = [ ":sparse_lib_test" ] | |
| } | |
| fuchsia_test_package("sparse-test-package") { | |
| package_name = "sparse-test-gn" | |
| test_components = [ ":sparse-test-component" ] | |
| } |