| # 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/package.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/test/test_package.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:futures", |
| "//third_party/rust_crates:http", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:log", |
| "//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:thiserror", |
| "//third_party/rust_crates:uuid", |
| ] |
| |
| test_deps = [ "//third_party/rust_crates:matches" ] |
| |
| sources = [ |
| "src/clock.rs", |
| "src/common.rs", |
| "src/configuration.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", |
| ] |
| } |
| |
| unittest_package("omaha-client-lib-tests") { |
| deps = [ ":omaha-client_test" ] |
| |
| tests = [ |
| { |
| name = "omaha_client_lib_test" |
| dest = "omaha-client-lib-test" |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":omaha-client-lib-tests" ] |
| } |