blob: 3527d275d7ff2fb7e5293b63daa2293223334fd7 [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/rust/rustc_test.gni")
import("//build/testing/environments.gni")
import("//src/sys/build/components.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.paver:fuchsia.paver-rustc",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//sdk/fidl/fuchsia.space:fuchsia.space-rustc",
"//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-rustc",
"//sdk/fidl/fuchsia.update:fuchsia.update-rustc",
"//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/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/system-image",
"//src/sys/pkg/testing/blobfs-ramdisk",
"//src/sys/pkg/testing/dir-reflector:test.pkg.reflector-rustc",
"//src/sys/pkg/testing/mock-paver",
"//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",
]
}
fuchsia_component("test-case-realm") {
testonly = true
manifest = "meta/test-case-realm.cml"
}
fuchsia_component("pkg-cache-integration-test") {
testonly = true
manifest = "meta/pkg-cache-integration-test.cml"
deps = [
":driver",
"//src/storage/bin/blobfs",
"//src/sys/pkg/bin/pkgfs:pkgsvr",
"//src/sys/pkg/bin/pm:pm_bin",
]
}
fuchsia_component("test-root") {
testonly = true
manifest = "meta/test-root.cml"
}
fuchsia_component("service-reflector") {
testonly = true
manifest = "meta/service-reflector.cml"
deps = [ "//src/sys/pkg/testing/dir-reflector:bin" ]
}
fuchsia_test_package("pkg-cache-integration-tests") {
test_components = [ ":test-root" ]
deps = [
":pkg-cache-integration-test",
":service-reflector",
":test-case-realm",
"//src/diagnostics/archivist:archivist-for-embedding-v2",
"//src/lib/isolated_devmgr/v2_component:isolated-devmgr-component",
"//src/sys/pkg/bin/pkg-cache:component-v2",
"//src/sys/pkg/bin/system-update-committer:component",
]
}
group("tests") {
testonly = true
public_deps = [ ":pkg-cache-integration-tests" ]
}