| # 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/dist/resource.gni") |
| import("//build/package.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/test/test_package.gni") |
| |
| rustc_library("lib") { |
| name = "lib" |
| edition = "2018" |
| |
| deps = [ |
| "//garnet/lib/rust/io_util", |
| "//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.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-rustc", |
| "//src/lib/diagnostics/hierarchy/rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-hyper", |
| "//src/lib/fuchsia-url", |
| "//src/lib/http-uri-ext", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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/lib/metrics:cobalt_sw_delivery_registry_rustlib", |
| "//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:glob", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:http", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:void", |
| ] |
| |
| sources = [ |
| "src/lib.rs", |
| "src/mock_filesystem.rs", |
| ] |
| } |
| |
| rustc_test("dynamic_repositories_disabled") { |
| name = "dynamic-repositories-disabled" |
| edition = "2018" |
| |
| source_root = "src/dynamic_repositories_disabled.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-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/fuchsia-hyper", |
| "//src/lib/fuchsia-url", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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/pkgfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:void", |
| ] |
| |
| sources = [ "src/dynamic_repositories_disabled.rs" ] |
| } |
| |
| rustc_test("dynamic_rewrite_disabled") { |
| name = "dynamic-rewrite-disabled" |
| edition = "2018" |
| |
| source_root = "src/dynamic_rewrite_disabled.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-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/fuchsia-hyper", |
| "//src/lib/fuchsia-url", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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/pkgfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:void", |
| ] |
| |
| sources = [ "src/dynamic_rewrite_disabled.rs" ] |
| } |
| |
| rustc_test("pkg_resolve_inspect") { |
| name = "pkg-resolve-inspect" |
| edition = "2018" |
| |
| source_root = "src/pkg_resolve_inspect.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-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/fuchsia-hyper", |
| "//src/lib/fuchsia-url", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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/pkgfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:void", |
| ] |
| |
| sources = [ "src/pkg_resolve_inspect.rs" ] |
| } |
| |
| rustc_test("resolve_fails") { |
| name = "resolve-fails" |
| edition = "2018" |
| |
| source_root = "src/resolve_fails.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//src/lib/fuchsia-async", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/fidl-fuchsia-pkg-ext", |
| "//src/sys/pkg/lib/fuchsia-pkg-testing", |
| "//src/sys/pkg/lib/metrics:cobalt_sw_delivery_registry_rustlib", |
| ] |
| |
| sources = [ "src/resolve_fails.rs" ] |
| } |
| |
| rustc_test("resolve_propagates_pkgfs_failure") { |
| name = "resolve-propagates-pkgfs-failure" |
| edition = "2018" |
| |
| source_root = "src/resolve_propagates_pkgfs_failure.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-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/fuchsia-hyper", |
| "//src/lib/fuchsia-url", |
| "//src/lib/storage/pseudo-fs", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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/pkgfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:void", |
| ] |
| |
| sources = [ "src/resolve_propagates_pkgfs_failure.rs" ] |
| } |
| |
| rustc_test("resolve_recovers_from_http_errors") { |
| name = "resolve-recovers-from-http-errors" |
| edition = "2018" |
| |
| source_root = "src/resolve_recovers_from_http_errors.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-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/fuchsia-hyper", |
| "//src/lib/fuchsia-url", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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/pkgfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:void", |
| ] |
| |
| sources = [ "src/resolve_recovers_from_http_errors.rs" ] |
| } |
| |
| rustc_test("resolve_resumes_blob_gets") { |
| name = "resolve-resumes-blob-gets" |
| edition = "2018" |
| |
| source_root = "src/resolve_resumes_blob_gets.rs" |
| |
| deps = [ |
| ":lib", |
| "//src/lib/fuchsia-async", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/pkg/lib/fuchsia-pkg-testing", |
| "//src/sys/pkg/lib/metrics:cobalt_sw_delivery_registry_rustlib", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:http", |
| "//third_party/rust_crates:hyper", |
| ] |
| |
| sources = [ "src/resolve_resumes_blob_gets.rs" ] |
| } |
| |
| rustc_test("resolve_succeeds_with_broken_minfs") { |
| name = "resolve-succeeds-with-broken-minfs" |
| edition = "2018" |
| |
| source_root = "src/resolve_succeeds_with_broken_minfs.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-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/fuchsia-hyper", |
| "//src/lib/fuchsia-url", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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/pkgfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:void", |
| ] |
| |
| sources = [ "src/resolve_succeeds_with_broken_minfs.rs" ] |
| } |
| |
| rustc_test("resolve_succeeds") { |
| name = "resolve-succeeds" |
| edition = "2018" |
| |
| source_root = "src/resolve_succeeds.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-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/fuchsia-hyper", |
| "//src/lib/fuchsia-url", |
| "//src/lib/http-uri-ext", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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/pkgfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:http", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:void", |
| ] |
| |
| sources = [ "src/resolve_succeeds.rs" ] |
| } |
| |
| rustc_test("get_hash") { |
| name = "get-hash" |
| edition = "2018" |
| |
| source_root = "src/get_hash.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.net:fuchsia.net-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider-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/fuchsia-hyper", |
| "//src/lib/fuchsia-url", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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/pkgfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:void", |
| ] |
| |
| sources = [ "src/get_hash.rs" ] |
| } |
| |
| rustc_test("system_cache_fallback") { |
| name = "system-cache-fallback" |
| edition = "2018" |
| |
| source_root = "src/system_cache_fallback.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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", |
| "//src/sys/pkg/testing/pkgfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:serde_json", |
| ] |
| |
| sources = [ "src/system_cache_fallback.rs" ] |
| } |
| |
| rustc_test("base_pinning") { |
| name = "base-pinning" |
| edition = "2018" |
| |
| source_root = "src/base_pinning.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.pkg.rewrite:fuchsia.pkg.rewrite-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//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/pkgfs-ramdisk", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:openat", |
| "//third_party/rust_crates:serde_json", |
| ] |
| |
| sources = [ "src/base_pinning.rs" ] |
| } |
| |
| rustc_test("metrics") { |
| name = "metrics" |
| edition = "2018" |
| |
| source_root = "src/metrics.rs" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/pkg/lib/fuchsia-merkle", |
| "//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:hyper", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:serde_json", |
| ] |
| |
| sources = [ "src/metrics.rs" ] |
| } |
| |
| empty_repo_deps = [] |
| foreach(path, |
| [ |
| "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", |
| ]) { |
| resource_target = string_replace(path, "/", "_") |
| resource(resource_target) { |
| sources = [ "template/$path" ] |
| outputs = [ "empty-repo/$path" ] |
| } |
| empty_repo_deps += [ ":$resource_target" ] |
| } |
| |
| group("empty-repo") { |
| deps = empty_repo_deps |
| } |
| |
| test_package("pkg-resolver-integration-tests") { |
| deps = [ |
| ":base_pinning", |
| ":dynamic_repositories_disabled", |
| ":dynamic_rewrite_disabled", |
| ":get_hash", |
| ":lib", |
| ":metrics", |
| ":pkg_resolve_inspect", |
| ":resolve_fails", |
| ":resolve_propagates_pkgfs_failure", |
| ":resolve_recovers_from_http_errors", |
| ":resolve_resumes_blob_gets", |
| ":resolve_succeeds", |
| ":resolve_succeeds_with_broken_minfs", |
| ":system_cache_fallback", |
| "//garnet/go/src/grand_unified_binary", |
| "//src/storage/bin/blobfs", |
| "//src/sys/pkg/bin/grand-swd-binary", |
| "//src/sys/pkg/bin/pkg-cache:bin", |
| "//src/sys/pkg/bin/pkg-local-mirror:bin", |
| "//src/sys/pkg/bin/pm:pm_bin", |
| ] |
| |
| binaries = [ |
| { |
| name = "blobfs" |
| }, |
| { |
| name = "pkg_cache" |
| source = "pkg_cache" |
| }, |
| { |
| name = "pkg_local_mirror" |
| source = "pkg_local_mirror" |
| }, |
| { |
| name = "pkg_resolver" |
| source = "grand_swd_binary" |
| }, |
| { |
| name = "pkgsvr" |
| source = "grand_unified_binary" |
| }, |
| { |
| name = "pm" |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path("//src/sys/pkg/lib/fuchsia-pkg-testing/certs/ca.cert") |
| dest = "ssl/cert.pem" |
| }, |
| ] |
| |
| resource_deps = [ ":empty-repo" ] |
| |
| meta = [ |
| { |
| path = |
| rebase_path("//src/sys/pkg/bin/pkg-cache/meta/pkg-cache-isolated.cmx") |
| dest = "pkg-cache.cmx" |
| }, |
| { |
| path = rebase_path( |
| "//src/sys/pkg/bin/pkg-local-mirror/meta/pkg-local-mirror.cmx") |
| dest = "pkg-local-mirror.cmx" |
| }, |
| { |
| path = rebase_path( |
| "//src/sys/pkg/bin/pkg-resolver/meta/pkg-resolver-isolated.cmx") |
| dest = "pkg-resolver.cmx" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "dynamic_repositories_disabled" |
| dest = "dynamic-repositories-disabled" |
| }, |
| { |
| name = "dynamic_rewrite_disabled" |
| dest = "dynamic-rewrite-disabled" |
| }, |
| { |
| name = "get_hash" |
| dest = "get-hash" |
| }, |
| { |
| name = "pkg_resolve_inspect" |
| dest = "pkg-resolve-inspect" |
| }, |
| { |
| name = "resolve_propagates_pkgfs_failure" |
| dest = "resolve-propagates-pkgfs-failure" |
| }, |
| { |
| name = "resolve_recovers_from_http_errors" |
| dest = "resolve-recovers-from-http-errors" |
| }, |
| { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| name = "resolve_resumes_blob_gets" |
| dest = "resolve-resumes-blob-gets" |
| }, |
| { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| name = "resolve_fails" |
| dest = "resolve-fails" |
| }, |
| { |
| name = "resolve_succeeds" |
| dest = "resolve-succeeds" |
| }, |
| { |
| name = "resolve_succeeds_with_broken_minfs" |
| dest = "resolve-succeeds-with-broken-minfs" |
| }, |
| { |
| name = "system_cache_fallback" |
| dest = "system-cache-fallback" |
| }, |
| { |
| name = "base_pinning" |
| dest = "base-pinning" |
| }, |
| { |
| name = "metrics" |
| dest = "metrics" |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":pkg-resolver-integration-tests", |
| "//src/lib/storage/ramdevice_client:ramdisk-isolated-devmgr", |
| "//src/sys/pkg/bin/pm:pm", |
| ] |
| } |
| |
| resource("empty-repo-resource-keys") { |
| testonly = true |
| visibility = [ ":empty-repo-resource" ] |
| sources = [ |
| "template/keys/root.json", |
| "template/keys/snapshot.json", |
| "template/keys/targets.json", |
| "template/keys/timestamp.json", |
| ] |
| outputs = [ "empty-repo/keys/{{source_file_part}}" ] |
| } |
| |
| resource("empty-repo-resource-repository") { |
| testonly = true |
| visibility = [ ":empty-repo-resource" ] |
| sources = [ |
| "template/repository/1.root.json", |
| "template/repository/1.snapshot.json", |
| "template/repository/1.targets.json", |
| "template/repository/root.json", |
| "template/repository/snapshot.json", |
| "template/repository/targets.json", |
| "template/repository/timestamp.json", |
| ] |
| outputs = [ "empty-repo/repository/{{source_file_part}}" ] |
| } |
| |
| group("empty-repo-resource") { |
| testonly = true |
| public_deps = [ |
| ":empty-repo-resource-keys", |
| ":empty-repo-resource-repository", |
| ] |
| } |