blob: c758eaf1b607ed953641d3353a3063c842607eb3 [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/components.gni")
import("//build/rust/rustc_test.gni")
import("//build/testing/environments.gni")
rustc_test("driver") {
name = "pkg_cache_integration_test"
edition = "2021"
deps = [
"//sdk/fidl/fuchsia.boot:fuchsia.boot-rustc",
"//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-test",
"//src/lib/fuchsia-fs",
"//src/lib/storage/vfs/rust:vfs",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/pkg/fidl/fuchsia.update.verify:fuchsia.update.verify-rustc",
"//src/sys/pkg/lib/blobfs",
"//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/mock-boot-arguments:lib",
"//src/sys/pkg/testing/mock-paver",
"//src/sys/pkg/testing/mock-verifier:lib",
"//third_party/cobalt/src/lib/client/rust:cobalt-client",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:hex",
"//third_party/rust_crates:maplit",
"//third_party/rust_crates:openat",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:tempfile",
]
sources = [
"src/base_pkg_index.rs",
"src/cache_pkg_index.rs",
"src/cobalt.rs",
"src/executability_enforcement.rs",
"src/get.rs",
"src/inspect.rs",
"src/lib.rs",
"src/open.rs",
"src/pkgfs.rs",
"src/retained_packages.rs",
"src/space.rs",
"src/sync.rs",
]
}
fuchsia_component("pkg-cache-integration-test") {
testonly = true
manifest = "meta/pkg-cache-integration-test.cml"
deps = [
":driver",
"//sdk/lib/driver_test_realm/platform",
"//src/storage/bin/blobfs",
"//src/sys/pkg/bin/pm:pm_bin",
]
}
fuchsia_component("test-root") {
testonly = true
manifest = "meta/test-root.cml"
}
fuchsia_test_package("pkg-cache-integration-tests") {
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
test_components = [ ":test-root" ]
deps = [
":pkg-cache-integration-test",
"//src/diagnostics/archivist:archivist-for-embedding-v2",
"//src/storage/testing:storage_drivers",
"//src/sys/pkg/bin/pkg-cache:component",
"//src/sys/pkg/bin/pkg-cache:component-ignore-system-image",
"//src/sys/pkg/bin/system-update-committer:component",
]
}
group("tests") {
testonly = true
if (!is_coverage) {
# TODO(https://fxbug.dev/78749): Re-enable this test when this test does
# not timeout.
public_deps = [ ":pkg-cache-integration-tests" ]
}
}