blob: 62297c6f4cf65998fd5ed149a219570661a5ab76 [file] [log] [blame]
# Copyright 2017 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/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
group("system") {
testonly = true
deps = [
# Directory aggregates should not modify the product behavior: ":config",
":system_recovery",
":tests",
]
}
group("tests") {
testonly = true
deps = [
":system_recovery",
":system_recovery_tests",
]
}
rustc_binary("bin") {
name = "system_recovery"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume-rustc",
"//sdk/fidl/fuchsia.paver:fuchsia.paver-rustc",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/mapped-vmo",
"//src/lib/storage/fs_management",
"//src/lib/ui/carnelian",
"//src/lib/ui/fuchsia-framebuffer",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:rouille",
"//third_party/rust_crates:thiserror",
]
}
config_data("config") {
for_pkg = "sysmgr"
sources = [ "config/recovery.config" ]
outputs = [ "recovery.config" ]
}
generate_manifest("blobfs.manifest") {
visibility = [ ":*" ]
args = [ "--binary=bin/blobfs" ]
}
blobfs_manifest_outputs = get_target_outputs(":blobfs.manifest")
blobfs_manifest_file = blobfs_manifest_outputs[0]
package("system_recovery") {
extra = [ blobfs_manifest_file ]
meta = [
{
path = rebase_path("meta/system_recovery.cmx")
dest = "system_recovery.cmx"
},
]
deps = [
":bin",
":blobfs.manifest",
]
binaries = [
{
name = "system_recovery"
path = "system_recovery"
},
]
}
test_package("system_recovery_tests") {
deps = [ ":bin_test" ]
tests = [
{
name = "system_recovery_bin_test"
environments = [ nuc_env ]
},
]
}