| # 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 = "2024" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_rust", |
| "//sdk/fidl/fuchsia.component.resolution:fuchsia.component.resolution_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_rust", |
| "//sdk/fidl/fuchsia.metrics:fuchsia.metrics_rust", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver_rust", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust", |
| "//sdk/fidl/fuchsia.pkg.garbagecollector:fuchsia.pkg.garbagecollector_rust", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_rust", |
| "//sdk/fidl/fuchsia.update:fuchsia.update_rust", |
| "//sdk/rust/zx", |
| "//src/lib/diagnostics/hierarchy/rust", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component-test", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/fuchsia-sync", |
| "//src/storage/fxfs/fidl/fuchsia.fxfs:fuchsia.fxfs_rust", |
| "//src/storage/lib/blob_writer:blob-writer", |
| "//src/storage/lib/delivery_blob", |
| "//src/storage/lib/vfs/rust:vfs", |
| "//src/sys/lib/cm_rust", |
| "//src/sys/lib/fidl-fuchsia-pkg-ext", |
| "//src/sys/pkg/fidl/fuchsia.update.verify:fuchsia.update.verify_rust", |
| "//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/testing/blobfs-ramdisk", |
| "//src/sys/pkg/testing/mock-health-verification", |
| "//src/sys/pkg/testing/mock-metrics", |
| "//src/sys/pkg/testing/mock-paver", |
| "//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:rand", |
| "//third_party/rust_crates:test-case", |
| ] |
| |
| 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/pkgfs.rs", |
| "src/retained_blobs.rs", |
| "src/retained_packages.rs", |
| "src/space.rs", |
| "src/sync.rs", |
| "src/write_blobs.rs", |
| ] |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] |
| } |
| |
| fuchsia_component("pkg-cache-integration-test") { |
| testonly = true |
| manifest = "meta/pkg-cache-integration-test.cml" |
| deps = [ |
| ":driver", |
| "//src/storage/fxfs:fxfs_component", |
| "//src/storage/testing:storage_driver_test_realm", |
| ] |
| } |
| |
| 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/sys/pkg/bin/pkg-cache:production-component-and-config", |
| "//src/sys/pkg/bin/system-update-committer:component", |
| ] |
| } |
| |
| group("hermetic_tests") { |
| testonly = true |
| if (!is_coverage) { |
| # TODO(https://fxbug.dev/42158909): Re-enable this test when this test does |
| # not timeout. |
| public_deps = [ ":pkg-cache-integration-tests" ] |
| } |
| } |