blob: 5e81bdac69b8a6e7d1fa8dcf9f334961a0d5674c [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_library.gni")
import("//build/rust/rustc_test.gni")
rustc_library("fuchsia-pkg-testing") {
version = "0.1.0"
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.inspect:fuchsia.inspect-rustc",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-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-fs",
"//src/lib/fuchsia-hyper",
"//src/lib/fuchsia-runtime",
"//src/lib/fuchsia-url",
"//src/lib/http-sse:http_sse",
"//src/lib/versioning/version-history/rust:version-history",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/lib/fidl-fuchsia-pkg-ext",
"//src/sys/pkg/bin/pkg-local-mirror:lib",
"//src/sys/pkg/lib/blobfs",
"//src/sys/pkg/lib/far/rust:fuchsia-archive",
"//src/sys/pkg/lib/fuchsia-hash",
"//src/sys/pkg/lib/fuchsia-merkle",
"//src/sys/pkg/lib/fuchsia-pkg",
"//src/sys/pkg/lib/system-image",
"//src/sys/pkg/lib/update-package",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:chrono",
"//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:itertools",
"//third_party/rust_crates:maplit",
"//third_party/rust_crates:maybe-owned",
"//third_party/rust_crates:openat",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:rustls",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:tokio",
"//third_party/rust_crates:tokio-rustls",
"//third_party/rust_crates:walkdir",
]
test_deps = [ "//third_party/rust_crates:assert_matches" ]
sources = [
"src/blobfs.rs",
"src/fake_pkg_local_mirror.rs",
"src/inspect.rs",
"src/lib.rs",
"src/package.rs",
"src/process.rs",
"src/repo.rs",
"src/serve.rs",
"src/serve/responder.rs",
"src/system_image.rs",
"src/update_package.rs",
]
inputs = [
"certs/wildcard.fuchsia-updates.googleusercontent.com.rsa",
"certs/test.fuchsia.com.rsa",
"certs/test.fuchsia.com.certchain",
"certs/wildcard.fuchsia-updates.googleusercontent.com.certchain",
]
}
fuchsia_unittest_package("fuchsia-pkg-testing-tests") {
manifest = "meta/fuchsia-pkg-testing-tests.cml"
deps = [
":fuchsia-pkg-testing_test",
"//src/connectivity/network/dns:component",
"//src/connectivity/network/netstack:component",
"//src/storage/bin/blobfs",
"//src/sys/pkg/bin/pm:pm_bin",
]
}
group("tests") {
testonly = true
public_deps = [
":fuchsia-pkg-testing-tests",
"//src/sys/pkg/bin/pm:pm",
]
}