| # Copyright 2019 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") |
| import("//build/rust/rustc_test.gni") |
| |
| rustc_binary("bin") { |
| name = "factoryctl" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot-rustc", |
| "//sdk/fidl/fuchsia.factory:fuchsia.factory-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:nom", |
| "//third_party/rust_crates:structopt", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ "//src/lib/storage/vfs/rust:vfs" ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_component("factoryctl_comp") { |
| component_name = "factoryctl" |
| manifest = "meta/factoryctl.cmx" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_shell_package("factoryctl") { |
| deps = [ ":factoryctl_comp" ] |
| } |
| |
| fuchsia_unittest_component("factoryctl_bin_test_comp") { |
| component_name = "factoryctl_bin_test" |
| manifest = "meta/factoryctl_bin_test.cmx" |
| deps = [ ":bin_test" ] |
| } |
| |
| fuchsia_test_package("factoryctl_tests") { |
| test_components = [ ":factoryctl_bin_test_comp" ] |
| deps = [ ":factoryctl_comp" ] |
| } |