blob: a20aa5d9fcd440f68560ea31074a92f0ad53ad1a [file] [log] [blame]
# 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/lib/rust/fidl_fuchsia_pkg_ext",
"//garnet/lib/rust/fuchsia_uri",
"//garnet/lib/rust/fuchsia_uri_rewrite",
"//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",
"//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/go/src/grand_unified_binary",
]
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"
},
]
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
},
]
}