| # 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_library.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| rustc_library("driver") { |
| name = "amberctl-tests" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//garnet/public/lib/fidl/rust/fidl", |
| "//garnet/public/rust/fuchsia-async", |
| "//garnet/public/rust/fuchsia-component", |
| "//sdk/fidl/fuchsia.amber:fuchsia.amber-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:futures-preview", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_derive", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| ] |
| } |
| |
| test_package("amberctl-tests") { |
| deps = [ |
| ":driver", |
| "//garnet/go/src/grand_unified_binary", |
| "//garnet/go/src/amber:cobalt_sw_delivery_registry", |
| ] |
| |
| binaries = [ |
| { |
| name = "amber" |
| source = "grand_unified_binary" |
| }, |
| { |
| name = "amberctl" |
| source = "grand_unified_binary" |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path("//garnet/go/src/amber/keys/root_sig.json") |
| dest = "keys" |
| }, |
| { |
| path = rebase_path("data/test.json") |
| dest = "sources/test.json" |
| }, |
| { |
| path = rebase_path( |
| get_label_info("//garnet/go/src/amber:cobalt_sw_delivery_registry", "target_gen_dir") + |
| "/cobalt_sw_delivery_registry.pb") |
| dest = "cobalt_config.pb" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("//garnet/go/src/amber/meta/amber_with_isolated_storage.cmx") |
| dest = "amber_with_isolated_storage.cmx" |
| }, |
| { |
| path = rebase_path("//garnet/go/src/amber/meta/amberctl.cmx") |
| dest = "amberctl.cmx" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "amberctl_tests_lib_test" |
| environments = basic_envs |
| }, |
| ] |
| } |