| # 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/components.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| rustc_binary("bin") { |
| name = "installer" |
| |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.device:fuchsia.device-rustc", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block-rustc", |
| "//sdk/fidl/fuchsia.hardware.block.partition:fuchsia.hardware.block.partition-rustc", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver-rustc", |
| "//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//src/sys/lib/payload_streamer", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:structopt", |
| ] |
| |
| # Use static linking since we're in the zbi. |
| configs -= [ "//build/config/fuchsia:dynamic_rust_standard_library" ] |
| |
| sources = [ |
| "src/main.rs", |
| "src/partition.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("installer-tests") { |
| manifest = "meta/installer-bin-test.cmx" |
| deps = [ ":bin_test" ] |
| test_specs = { |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":installer-tests" ] |
| } |