blob: b1d8381abbff5bdfa32eb66d87a3e4bf29cd3ed1 [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 = "pkg_cache_integration_test"
edition = "2018"
deps = [
"//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt-rustc",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//sdk/fidl/fuchsia.space:fuchsia.space-rustc",
"//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-rustc",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/inspect/rust/fuchsia-inspect",
"//src/lib/inspect/rust/fuchsia-inspect-contrib",
"//src/lib/syslog/rust:syslog",
"//src/lib/trace/rust:trace",
"//src/lib/trace/rust:trace-provider",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/pkg/lib/fuchsia-merkle",
"//src/sys/pkg/lib/fuchsia-pkg",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/lib/metrics:cobalt_sw_delivery_registry_rustlib",
"//src/sys/pkg/lib/pkgfs",
"//src/sys/pkg/lib/system-image",
"//src/sys/pkg/testing/blobfs-ramdisk",
"//src/sys/pkg/testing/pkgfs-ramdisk",
"//third_party/cobalt/src/lib/client/rust:cobalt-client",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:hex",
"//third_party/rust_crates:matches",
"//third_party/rust_crates:openat",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:tempfile",
]
}
# Include blobfs in the build, which comes from Zircon
generate_manifest("blobfs.manifest") {
visibility = [ ":*" ]
args = []
foreach(pattern, [ "bin/blobfs" ]) {
args += [ "--binary=" + pattern ]
}
}
blobfs_manifest_outputs = get_target_outputs(":blobfs.manifest")
blobfs_manifest_file = blobfs_manifest_outputs[0]
test_package("pkg-cache-integration-tests") {
deps = [
":blobfs.manifest",
":driver",
"//garnet/go/src/grand_unified_binary",
"//src/sys/pkg/bin/pkg-cache:bin",
]
binaries = [
{
name = "pkg_cache"
dest = "pkg-cache"
},
{
name = "pkgsvr"
source = "grand_unified_binary"
},
]
meta = [
{
path = rebase_path(
"//src/sys/pkg/bin/pkg-cache/meta/pkg-cache-without-pkgfs.cmx")
dest = "pkg-cache-without-pkgfs.cmx"
},
]
tests = [
{
name = "pkg_cache_integration_test"
dest = "pkg-cache-integration-test"
environments = basic_envs
},
]
extra = [ blobfs_manifest_file ]
}
group("tests") {
testonly = true
public_deps = [
":pkg-cache-integration-tests",
"//src/lib/storage/ramdevice_client:ramdisk-isolated-devmgr",
]
}