| # 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/test/test_package.gni") |
| |
| rustc_binary("bin") { |
| name = "update" |
| with_unit_tests = true |
| edition = "2018" |
| deps = [ |
| "//sdk/fidl/fuchsia.update:fuchsia.update-rustc", |
| "//sdk/fidl/fuchsia.update.channelcontrol:fuchsia.update.channelcontrol-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/sys/pkg/lib/fidl-fuchsia-update-ext", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ "//third_party/rust_crates:matches" ] |
| } |
| |
| package("update-bin") { |
| deps = [ ":bin" ] |
| binaries = [ |
| { |
| name = "update" |
| shell = true |
| }, |
| ] |
| meta = [ |
| { |
| path = rebase_path("meta/update.cmx") |
| dest = "update.cmx" |
| }, |
| ] |
| } |
| |
| test_package("update-bin-tests") { |
| deps = [ ":bin_test" ] |
| |
| tests = [ |
| { |
| name = "update_bin_test" |
| dest = "update-bin-test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":update-bin-tests" ] |
| } |