| # 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/package.gni") | |
| import("//build/rust/rustc_binary.gni") | |
| import("//build/rust/rustc_test.gni") | |
| import("//build/test/test_package.gni") | |
| import("//build/testing/environments.gni") | |
| rustc_binary("bin") { | |
| name = "factoryctl" | |
| edition = "2018" | |
| with_unit_tests = true | |
| deps = [ | |
| "//garnet/lib/rust/files_async", | |
| "//garnet/lib/rust/io_util", | |
| "//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/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/pseudo-fs" ] | |
| sources = [ "src/main.rs" ] | |
| } | |
| package("factoryctl") { | |
| deps = [ ":bin" ] | |
| binaries = [ | |
| { | |
| name = "factoryctl" | |
| shell = true | |
| }, | |
| ] | |
| meta = [ | |
| { | |
| path = rebase_path("meta/factoryctl.cmx") | |
| dest = "factoryctl.cmx" | |
| }, | |
| ] | |
| } | |
| test_package("factoryctl_tests") { | |
| deps = [ | |
| ":bin", | |
| ":bin_test", | |
| ] | |
| binaries = [ | |
| { | |
| name = "factoryctl" | |
| }, | |
| ] | |
| meta = [ | |
| { | |
| path = rebase_path("meta/factoryctl.cmx") | |
| dest = "factoryctl.cmx" | |
| }, | |
| ] | |
| tests = [ | |
| { | |
| name = "factoryctl_bin_test" | |
| environments = basic_envs | |
| }, | |
| ] | |
| } |