| # 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") |
| |
| rustc_library("omaha-client") { |
| version = "0.0.1" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/sys/pkg/lib/async-generator", |
| "//src/sys/pkg/lib/version", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:ecdsa", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:http", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:p256", |
| "//third_party/rust_crates:pretty_assertions", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:serde_repr", |
| "//third_party/rust_crates:sha2", |
| "//third_party/rust_crates:signature", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:url", |
| "//third_party/rust_crates:uuid", |
| ] |
| |
| test_deps = [ "//third_party/rust_crates:assert_matches" ] |
| |
| sources = [ |
| "src/app_set.rs", |
| "src/clock.rs", |
| "src/common.rs", |
| "src/configuration.rs", |
| "src/cup_ecdsa.rs", |
| "src/http_request.rs", |
| "src/http_request/mock.rs", |
| "src/installer.rs", |
| "src/installer/stub.rs", |
| "src/lib.rs", |
| "src/metrics.rs", |
| "src/metrics/mock.rs", |
| "src/metrics/stub.rs", |
| "src/policy.rs", |
| "src/policy/mock.rs", |
| "src/policy/stub.rs", |
| "src/protocol.rs", |
| "src/protocol/request.rs", |
| "src/protocol/request/tests.rs", |
| "src/protocol/response.rs", |
| "src/protocol/response/tests.rs", |
| "src/request_builder.rs", |
| "src/request_builder/tests.rs", |
| "src/state_machine.rs", |
| "src/state_machine/builder.rs", |
| "src/state_machine/observer.rs", |
| "src/state_machine/update_check.rs", |
| "src/storage.rs", |
| "src/storage/memory.rs", |
| "src/storage/stub.rs", |
| "src/time.rs", |
| "src/time/complex.rs", |
| "src/time/time_source.rs", |
| "src/time/timers.rs", |
| "src/unless.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("omaha-client-lib-tests") { |
| deps = [ ":omaha-client_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":omaha-client-lib-tests", |
| ":omaha-client_test($host_toolchain)", |
| ] |
| } |