blob: e53a4929d875f1e5dade4e403732789c903d69c8 [file] [log] [blame]
# Copyright 2020 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/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//src/lib/isolated_devmgr/v2_component/isolated_devmgr.gni")
import("//src/sys/build/fuchsia_component.gni")
import("//src/sys/build/fuchsia_test_package.gni")
rustc_binary("bin") {
name = "export_ffs"
edition = "2018"
deps = [
":export_ffs",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//src/lib/fdio/rust:fdio",
"//src/lib/fuchsia-async",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
]
sources = [ "src/main.rs" ]
}
package("export-ffs") {
deps = [ ":bin" ]
binaries = [
{
name = "export_ffs"
dest = "export-ffs"
shell = true
},
]
}
rustc_library("export_ffs") {
with_unit_tests = true
edition = "2018"
deps = [
"//garnet/lib/rust/files_async",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/storage/block_client/rust:remote-block-device",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//src/lib/fuchsia-async",
"//src/lib/isolated_devmgr/v2_component/rust:isolated-driver-manager",
"//src/lib/storage/ramdevice_client",
"//src/lib/storage/vfs/rust:vfs",
"//third_party/rust_crates:matches",
]
sources = [ "src/lib.rs" ]
}
isolated_devmgr_unittest_v2_component("export-ffs-tests-component") {
component_name = "export-ffs-tests"
executable_path = "bin/export_ffs_lib_test"
runner = "rust_test_runner"
deps = [ ":export_ffs_test" ]
}
fuchsia_test_package("export-ffs-tests") {
test_components = [ ":export-ffs-tests-component" ]
}
group("tests") {
testonly = true
deps = [
":export-ffs-tests",
"//src/lib/isolated_devmgr/v2_component",
]
}