| # 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/public/lib/fidl/rust/fidl", |
| "//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.space:fuchsia.space-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.update:fuchsia.update-rustc", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-url", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/fidl-fuchsia-pkg-ext", |
| "//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext", |
| "//src/sys/pkg/lib/fidl-fuchsia-amber-ext", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:parking_lot", |
| "//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", |
| "//src/sys/pkg/bin/pkg-resolver:bin", |
| ] |
| |
| binaries = [ |
| { |
| name = "amber" |
| source = "grand_unified_binary" |
| }, |
| { |
| name = "amberctl" |
| source = "grand_unified_binary" |
| }, |
| { |
| name = "pkg-resolver" |
| source = "pkg_resolver" |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path("data/test.json") |
| dest = "sources/test.json" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path( |
| "//src/sys/pkg/bin/amber/meta/amber_with_isolated_storage.cmx") |
| dest = "amber_with_isolated_storage.cmx" |
| }, |
| { |
| path = rebase_path("//src/sys/pkg/bin/amber/meta/amberctl.cmx") |
| dest = "amberctl.cmx" |
| }, |
| { |
| path = rebase_path( |
| "//src/sys/pkg/bin/pkg-resolver/meta/pkg-resolver-for-integration-test.cmx") |
| dest = "pkg-resolver-for-integration-test.cmx" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "amberctl_test" |
| dest = "amberctl-test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":amberctl-tests" ] |
| } |