blob: 291f669bdc03fd5ed4b4129d8801911aef3c8f84 [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/diagnostics/inspect/contrib/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//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-hash",
"//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",
]
sources = [
"src/base_pkg_index.rs",
"src/cobalt.rs",
"src/inspect.rs",
"src/lib.rs",
"src/space.rs",
"src/sync.rs",
]
}
test_package("pkg-cache-integration-tests") {
deps = [
":driver",
"//garnet/go/src/grand_unified_binary",
"//src/storage/bin/blobfs",
"//src/sys/pkg/bin/pkg-cache:bin",
"//src/sys/pkg/bin/pm:pm_bin",
]
binaries = [
{
name = "blobfs"
},
{
name = "pkg_cache"
dest = "pkg-cache"
},
{
name = "pkgsvr"
source = "grand_unified_binary"
},
{
name = "pm"
},
]
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
},
]
}
group("tests") {
testonly = true
public_deps = [
":pkg-cache-integration-tests",
"//src/lib/storage/ramdevice_client:ramdisk-isolated-devmgr",
]
}