| # Copyright 2022 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. |
| |
| if (is_host) { |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/testing/test_spec.gni") |
| |
| rustc_library("lib") { |
| name = "pbms" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//build/sdk/meta:rust", |
| "//src/developer/ffx/config:lib", |
| "//src/developer/ffx/lib/errors:lib", |
| "//src/developer/ffx/lib/fms", |
| "//src/developer/ffx/lib/sdk:lib", |
| "//src/lib/fuchsia-hyper", |
| "//src/lib/gcs", |
| "//src/lib/structured_ui", |
| "//src/lib/transfer_manifest", |
| "//src/sys/pkg/lib/fuchsia-repo", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-fs", |
| "//third_party/rust_crates:camino", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:itertools", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:tracing", |
| "//third_party/rust_crates:url", |
| ] |
| |
| test_deps = [ |
| "//src/developer/ffx/lib/pkg:empty-repo-keys", |
| "//src/developer/ffx/lib/pkg:empty-repo-metadata", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:async-net", |
| "//third_party/rust_crates:tuf", |
| ] |
| |
| inputs = [ |
| "test_data/test_core.json", |
| "test_data/test_images.json", |
| "test_data/test_product_bundle.json", |
| ] |
| sources = [ |
| "src/gcs.rs", |
| "src/lib.rs", |
| "src/pbms.rs", |
| "src/repo.rs", |
| "src/repo_info.rs", |
| "src/transfer_manifest.rs", |
| ] |
| } |
| |
| group("pbms") { |
| testonly = true |
| deps = [ |
| ":lib", |
| ":tests", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":lib_test" ] |
| } |
| } |