| # Copyright 2020 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/rust/rustc_library.gni") |
| import("//src/sys/build/components.gni") |
| |
| rustc_library("update-package") { |
| version = "0.1.0" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//garnet/lib/rust/files_async", |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-url", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/pkg/lib/fuchsia-hash", |
| "//src/sys/pkg/lib/fuchsia-pkg", |
| "//src/sys/pkg/lib/version", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fuchsia-async", |
| "//src/lib/storage/vfs/rust:vfs", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:matches", |
| "//third_party/rust_crates:proptest", |
| "//third_party/rust_crates:proptest-derive", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| sources = [ |
| "src/board.rs", |
| "src/hash.rs", |
| "src/image.rs", |
| "src/images.rs", |
| "src/lib.rs", |
| "src/name.rs", |
| "src/packages.rs", |
| "src/update_mode.rs", |
| "src/version.rs", |
| ] |
| } |
| |
| fuchsia_component("test-component") { |
| component_name = "update-package-lib-test" |
| visibility = [ ":*" ] |
| testonly = true |
| deps = [ ":update-package_test" ] |
| manifest = "meta/update-package-lib-test.cml" |
| } |
| |
| fuchsia_test_package("update-package-tests") { |
| test_components = [ ":test-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":update-package-tests" ] |
| } |