| # 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/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| rustc_binary("bin") { |
| name = "installer" |
| |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//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/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:structopt", |
| "//zircon/system/fidl/fuchsia-device:fuchsia-device-rustc", |
| "//zircon/system/fidl/fuchsia-hardware-block:fuchsia-hardware-block-rustc", |
| "//zircon/system/fidl/fuchsia-hardware-block-partition:fuchsia-hardware-block-partition-rustc", |
| "//zircon/system/fidl/fuchsia-mem:fuchsia-mem-rustc", |
| "//zircon/system/fidl/fuchsia-sysinfo:fuchsia-sysinfo-rustc", |
| ] |
| } |
| |
| generate_manifest("installer.bootfs") { |
| deps = [ ":bin" ] |
| |
| args = [ "--entry=bin/installer=" + |
| rebase_path("$root_build_dir/installer", root_build_dir) ] |
| } |
| |
| test_package("installer-tests") { |
| deps = [ ":bin_test" ] |
| |
| tests = [ |
| { |
| name = "installer_bin_test" |
| dest = "installer-bin-test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":installer-tests" ] |
| } |