| # 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_test.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| rustc_test("driver") { |
| name = "amberctl-test" |
| edition = "2018" |
| |
| deps = [ |
| "//garnet/lib/rust/fidl_fuchsia_amber_ext", |
| "//garnet/lib/rust/fidl_fuchsia_pkg_ext", |
| "//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.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/sys/lib/fuchsia_url:fuchsia_url", |
| "//src/sys/lib/fuchsia_url_rewrite", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:futures-preview", |
| "//third_party/rust_crates:hex", |
| "//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/bin/pkg_resolver:bin", |
| "//garnet/go/src/grand_unified_binary", |
| ] |
| |
| binaries = [ |
| { |
| name = "amber" |
| source = "grand_unified_binary" |
| }, |
| { |
| name = "amberctl" |
| source = "grand_unified_binary" |
| }, |
| { |
| name = "pkg_resolver" |
| source = "pkg_resolver" |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path("//garnet/go/src/amber/keys/root_sig.json") |
| dest = "keys" |
| }, |
| { |
| path = rebase_path("data/test.json") |
| dest = "sources/test.json" |
| }, |
| ] |
| |
| 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" |
| }, |
| { |
| path = rebase_path( |
| "//garnet/bin/pkg_resolver/meta/pkg_resolver_integration_test.cmx") |
| dest = "pkg_resolver_integration_test.cmx" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "amberctl_test" |
| environments = basic_envs |
| }, |
| ] |
| } |