blob: a5235e32d2cd900be461e736f2b5be75a7fadb54 [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_test.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
rustc_test("driver") {
name = "amberctl-test"
edition = "2018"
deps = [
"//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/fidl/rust/fidl",
"//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:http",
"//third_party/rust_crates:log",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:serde",
"//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 = "amberctl"
source = "grand_unified_binary"
},
{
name = "pkg-resolver"
source = "pkg_resolver"
},
]
resources = [
{
path = rebase_path("data/test.json")
dest = "sources/test.json"
},
{
path = rebase_path("//src/sys/pkg/lib/fuchsia-pkg-testing/certs/ca.cert")
dest = "ssl/cert.pem"
},
]
meta = [
{
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" ]
}