blob: 695086e7388f89ed2e8ae9aa0ac03ae09274ca2f [file]
# 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")
fuchsia_test_component("dynamic_repositories_disabled-component") {
component_name = "dynamic-repositories-disabled"
manifest = "meta/dynamic-repositories-disabled.cml"
deps = [ ":dynamic_repositories_disabled" ]
}
fuchsia_test_component("persists_tuf_metadata-component") {
component_name = "persists-tuf-metadata"
manifest = "meta/persists-tuf-metadata.cml"
deps = [ ":persists_tuf_metadata" ]
}
fuchsia_test_component("dynamic_rewrite_disabled-component") {
component_name = "dynamic-rewrite-disabled"
manifest = "meta/dynamic-rewrite-disabled.cml"
deps = [ ":dynamic_rewrite_disabled" ]
}
fuchsia_test_component("get_hash-component") {
component_name = "get-hash"
manifest = "meta/get-hash.cml"
deps = [ ":get_hash" ]
}
fuchsia_test_component("pkg_resolve_inspect-component") {
component_name = "pkg-resolve-inspect"
manifest = "meta/pkg-resolve-inspect.cml"
deps = [ ":pkg_resolve_inspect" ]
}
fuchsia_test_component("resolve_propagates_blobfs_failure-component") {
component_name = "resolve-propagates-blobfs-failure"
manifest = "meta/resolve-propagates-blobfs-failure.cml"
deps = [ ":resolve_propagates_blobfs_failure" ]
}
fuchsia_test_component("resolve_recovers_from_http_errors-component") {
component_name = "resolve-recovers-from-http-errors"
manifest = "meta/resolve-recovers-from-http-errors.cml"
deps = [ ":resolve_recovers_from_http_errors" ]
}
fuchsia_test_component("resolve_resumes_blob_gets-component") {
component_name = "resolve-resumes-blob-gets"
manifest = "meta/resolve-resumes-blob-gets.cml"
deps = [ ":resolve_resumes_blob_gets" ]
}
fuchsia_test_component("resolve_fails-component") {
component_name = "resolve-fails"
manifest = "meta/resolve-fails.cml"
deps = [ ":resolve_fails" ]
}
fuchsia_test_component("resolve_succeeds-component") {
component_name = "resolve-succeeds"
manifest = "meta/resolve-succeeds.cml"
deps = [
":resolve_succeeds",
"//src/storage/fxfs:fxfs_component",
]
}
fuchsia_test_component("resolve_with_context-component") {
component_name = "resolve-with-context"
manifest = "meta/resolve-with-context.cml"
deps = [ ":resolve_with_context" ]
}
fuchsia_test_component("resolve_succeeds_with_broken_minfs-component") {
component_name = "resolve-succeeds-with-broken-minfs"
manifest = "meta/resolve-succeeds-with-broken-minfs.cml"
deps = [ ":resolve_succeeds_with_broken_minfs" ]
}
fuchsia_test_component("system_cache_fallback-component") {
component_name = "system-cache-fallback"
manifest = "meta/system-cache-fallback.cml"
deps = [ ":system_cache_fallback" ]
}
fuchsia_test_component("base_pinning-component") {
component_name = "base-pinning"
manifest = "meta/base-pinning.cml"
deps = [ ":base_pinning" ]
}
fuchsia_test_component("metrics-component") {
component_name = "metrics"
manifest = "meta/metrics.cml"
deps = [ ":metrics" ]
}
fuchsia_test_component("eager_updates-component") {
component_name = "eager-updates"
manifest = "meta/eager-updates.cml"
deps = [ ":eager_updates" ]
}
fuchsia_test_component("ota_downloader-component") {
component_name = "ota-downloader"
manifest = "meta/ota-downloader.cml"
deps = [ ":ota_downloader" ]
}
fuchsia_test_component("resolve_overwrites_blobs-component") {
component_name = "resolve-overwrites-blobs"
manifest = "meta/resolve-overwrites-blobs.cml"
deps = [
":resolve_overwrites_blobs",
"//src/storage/fxfs:fxfs_component",
]
}
fuchsia_test_component("pkg_authority-component") {
component_name = "pkg-authority"
manifest = "meta/pkg-authority.cml"
deps = [
":pkg_authority",
"//src/storage/fxfs:fxfs_component",
]
}
fuchsia_component_manifest("pkg-resolver-manifest") {
component_name = "pkg-resolver"
manifest = "meta/pkg-resolver-for-test.cml"
}
fuchsia_component("pkg-resolver-component") {
cm_label = ":pkg-resolver-manifest"
deps = [ "//src/sys/pkg/bin/pkg-resolver:bin" ]
}
resource("ca.cert-resource") {
sources = [ "//src/sys/pkg/lib/fuchsia-pkg-testing/certs/ca.cert" ]
outputs = [ "data/ssl/cert.pem" ]
}
fuchsia_test_package("pkg-resolver-integration-tests") {
test_components = [
":base_pinning-component",
":dynamic_repositories_disabled-component",
":dynamic_rewrite_disabled-component",
":eager_updates-component",
":ota_downloader-component",
":get_hash-component",
":metrics-component",
":persists_tuf_metadata-component",
":pkg_resolve_inspect-component",
":resolve_fails-component",
":resolve_propagates_blobfs_failure-component",
":resolve_recovers_from_http_errors-component",
":resolve_resumes_blob_gets-component",
":resolve_succeeds-component",
":resolve_with_context-component",
":resolve_succeeds_with_broken_minfs-component",
":system_cache_fallback-component",
":resolve_overwrites_blobs-component",
":pkg_authority-component",
]
deps = [
":ca.cert-resource",
":empty-repo",
":pkg-resolver-component",
"//src/sys/pkg/bin/pkg-cache:production-component-and-config",
"//src/sys/pkg/bin/system-update-committer:component",
# For ramdisk devices, needed to back blobfs (which in turn backs pkg-cache)
"//src/storage/testing:storage_driver_test_realm",
]
subpackages = [
"//src/connectivity/network/dns:package",
# Isolated, low-deps netstack.
"//src/connectivity/network/netstack3:package-for-tests",
"//src/connectivity/policy/http-client:package",
]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
group("hermetic_tests") {
testonly = true
deps = [ ":pkg-resolver-integration-tests" ]
}
resource_tree("empty-repo") {
testonly = true
sources_root = "template"
sources = [
"keys/root.json",
"keys/snapshot.json",
"keys/targets.json",
"keys/timestamp.json",
"repository/1.root.json",
"repository/1.snapshot.json",
"repository/1.targets.json",
"repository/root.json",
"repository/snapshot.json",
"repository/targets.json",
"repository/timestamp.json",
]
dest_dir = "empty-repo"
}
## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ##
#
# ________ _________ ________ ________
# |\ ____\|\___ ___\\ __ \|\ __ \
# \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \
# \ \_____ \ \ \ \ \ \ \\\ \ \ ____\
# \|____|\ \ \ \ \ \ \ \\\ \ \ \___|
# ____\_\ \ \ \__\ \ \_______\ \__\
# |\_________\ \|__| \|_______|\|__|
# \|_________|
#
#
# AUTO-GENERATED - DO NOT EDIT
#
# The targets below are auto-generated based on the targets defined in the
# BUILD.bazel file from the same directory. If you made changes to targets in
# Bazel, instead of editing this file manually, run:
#
# > fx bazel2gn
#
# Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and
# rerun bazel2gn.
import("//build/tools/bazel2gn/bazel_migration.gni")
rustc_library("lib") {
testonly = true
sources = [
"src/lib.rs",
"src/mock_filesystem.rs",
]
edition = "2024"
lint_config = "//build/config/rust/lints:clippy_warn_all"
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.logger:fuchsia.logger_rust",
"//sdk/fidl/fuchsia.metrics:fuchsia.metrics_rust",
"//sdk/fidl/fuchsia.net.http:fuchsia.net.http_rust",
"//sdk/fidl/fuchsia.net.name:fuchsia.net.name_rust",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//sdk/fidl/fuchsia.pkg.garbagecollector:fuchsia.pkg.garbagecollector_rust",
"//sdk/fidl/fuchsia.pkg.http:fuchsia.pkg.http_rust",
"//sdk/fidl/fuchsia.pkg.internal:fuchsia.pkg.internal_rust",
"//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite_rust",
"//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_rust",
"//sdk/fidl/fuchsia.storage.block:fuchsia.storage.block_rust",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2_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:diagnostics-hierarchy",
"//src/lib/diagnostics/reader/rust",
"//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component-test",
"//src/lib/fuchsia-fs",
"//src/lib/fuchsia-sync",
"//src/lib/fuchsia-url",
"//src/storage/fidl/fuchsia.storage.mapping:fuchsia.storage.mapping_rust",
"//src/storage/fxfs/fidl/fuchsia.fxfs:fuchsia.fxfs_rust",
"//src/storage/lib/vfs/rust:vfs",
"//src/sys/lib/cm_rust",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext",
"//src/sys/pkg/lib/fuchsia-merkle",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/testing/blobfs-ramdisk",
"//src/sys/pkg/testing/mock-metrics",
"//third_party/cobalt/src/lib/client/rust:cobalt-client",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:http",
"//third_party/rust_crates:log",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tempfile",
]
}
rustc_test("dynamic_repositories_disabled") {
sources = [ "src/dynamic_repositories_disabled.rs" ]
source_root = "src/dynamic_repositories_disabled.rs"
edition = "2024"
deps = [
":lib",
"//sdk/rust/zx",
"//src/lib/fuchsia",
]
}
rustc_test("persists_tuf_metadata") {
sources = [ "src/persists_tuf_metadata.rs" ]
source_root = "src/persists_tuf_metadata.rs"
edition = "2024"
deps = [
":lib",
"//src/lib/fuchsia",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
]
}
rustc_test("dynamic_rewrite_disabled") {
sources = [ "src/dynamic_rewrite_disabled.rs" ]
source_root = "src/dynamic_rewrite_disabled.rs"
edition = "2024"
deps = [
":lib",
"//sdk/rust/zx",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext",
]
}
rustc_test("pkg_resolve_inspect") {
sources = [ "src/pkg_resolve_inspect.rs" ]
source_root = "src/pkg_resolve_inspect.rs"
edition = "2024"
deps = [
":lib",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions",
"//src/lib/fuchsia",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
]
}
rustc_test("resolve_fails") {
sources = [ "src/resolve_fails.rs" ]
source_root = "src/resolve_fails.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/lib/fuchsia",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/lib/fuchsia-repo",
"//src/sys/pkg/lib/metrics:cobalt_sw_delivery_registry_rustlib",
"//third_party/rust_crates:hyper",
]
}
rustc_test("resolve_propagates_blobfs_failure") {
sources = [ "src/resolve_propagates_blobfs_failure.rs" ]
source_root = "src/resolve_propagates_blobfs_failure.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//sdk/rust/zx",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/storage/fxfs/fidl/fuchsia.fxfs:fuchsia.fxfs_rust",
"//src/storage/lib/vfs/rust:vfs",
"//src/sys/pkg/lib/fuchsia-merkle",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/testing/blobfs-ramdisk",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
]
}
rustc_test("resolve_recovers_from_http_errors") {
sources = [ "src/resolve_recovers_from_http_errors.rs" ]
source_root = "src/resolve_recovers_from_http_errors.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/lib/fuchsia",
"//src/sys/pkg/lib/fuchsia-merkle",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//third_party/rust_crates:assert_matches",
]
}
rustc_test("resolve_resumes_blob_gets") {
sources = [ "src/resolve_resumes_blob_gets.rs" ]
source_root = "src/resolve_resumes_blob_gets.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/lib/fuchsia",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/lib/fuchsia-repo",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:http",
"//third_party/rust_crates:hyper",
]
}
rustc_test("resolve_succeeds_with_broken_minfs") {
sources = [ "src/resolve_succeeds_with_broken_minfs.rs" ]
source_root = "src/resolve_succeeds_with_broken_minfs.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/rust/zx",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-fs",
"//src/storage/lib/vfs/rust:vfs",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tempfile",
]
}
rustc_test("resolve_succeeds") {
sources = [ "src/resolve_succeeds.rs" ]
source_root = "src/resolve_succeeds.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/http-uri-ext",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/testing/blobfs-ramdisk",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:rand",
]
}
rustc_test("resolve_with_context") {
sources = [ "src/resolve_with_context.rs" ]
source_root = "src/resolve_with_context.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/lib/fuchsia",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
]
}
rustc_test("get_hash") {
sources = [ "src/get_hash.rs" ]
source_root = "src/get_hash.rs"
edition = "2024"
deps = [
":lib",
"//sdk/rust/zx",
"//src/lib/fuchsia",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//third_party/rust_crates:assert_matches",
]
}
rustc_test("system_cache_fallback") {
sources = [ "src/system_cache_fallback.rs" ]
source_root = "src/system_cache_fallback.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//sdk/rust/zx",
"//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext",
"//src/sys/pkg/lib/fuchsia-hash",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/testing/blobfs-ramdisk",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:rand",
]
}
rustc_test("base_pinning") {
sources = [ "src/base_pinning.rs" ]
source_root = "src/base_pinning.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//sdk/rust/zx",
"//src/lib/fuchsia",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
]
}
rustc_test("metrics") {
sources = [ "src/metrics.rs" ]
source_root = "src/metrics.rs"
edition = "2024"
deps = []
deps += [
":lib",
"//sdk/fidl/fuchsia.metrics:fuchsia.metrics_rust",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/lib/fuchsia",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/lib/metrics:cobalt_sw_delivery_registry_rustlib",
"//third_party/cobalt/src/lib/client/rust:cobalt-client",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:serde_json",
]
if (current_cpu == "riscv64") {
deps += []
} else {
deps += [ "//third_party/rust_crates:test-case" ]
}
}
rustc_test("eager_updates") {
sources = [ "src/eager_updates.rs" ]
source_root = "src/eager_updates.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-url",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//src/sys/pkg/lib/metrics:cobalt_sw_delivery_registry_rustlib",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:omaha_client",
"//third_party/rust_crates:serde_json",
]
}
rustc_test("ota_downloader") {
sources = [ "src/ota_downloader.rs" ]
source_root = "src/ota_downloader.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/lib/fuchsia",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
]
}
rustc_test("resolve_overwrites_blobs") {
sources = [ "src/resolve_overwrites_blobs.rs" ]
source_root = "src/resolve_overwrites_blobs.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.storage.blobfs:fuchsia.storage.blobfs_rust",
"//src/lib/fuchsia",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
]
}
rustc_test("pkg_authority") {
sources = [ "src/pkg_authority.rs" ]
source_root = "src/pkg_authority.rs"
edition = "2024"
deps = [
":lib",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg_rust",
"//src/lib/fuchsia",
"//src/lib/http-uri-ext",
"//src/sys/lib/fidl-fuchsia-pkg-rewrite-ext",
"//src/sys/pkg/lib/fuchsia-pkg-testing",
]
}