| # 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/config.gni") | |
| import("//build/rust/rustc_binary.gni") | |
| import("//src/sys/build/components.gni") | |
| rustc_binary("bin") { | |
| name = "httpsdate_time_source" | |
| edition = "2018" | |
| with_unit_tests = true | |
| deps = [ | |
| "//sdk/fidl/fuchsia.time.external:fuchsia.time.external-rustc", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//src/lib/syslog/rust:syslog", | |
| "//src/lib/zircon/rust:fuchsia-zircon", | |
| "//src/sys/time/lib/httpdate-hyper", | |
| "//src/sys/time/lib/push-source", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:async-trait", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:hyper", | |
| "//third_party/rust_crates:log", | |
| ] | |
| sources = [ | |
| "src/httpsdate.rs", | |
| "src/main.rs", | |
| ] | |
| test_deps = [ | |
| "//third_party/rust_crates:lazy_static", | |
| "//third_party/rust_crates:matches", | |
| ] | |
| } | |
| fuchsia_component("service") { | |
| component_name = "httpsdate_time_source" | |
| manifest = "meta/service.cmx" | |
| deps = [ ":bin" ] | |
| } | |
| fuchsia_unittest_package("httpsdate-time-source-tests") { | |
| manifest = "meta/unittests.cmx" | |
| deps = [ ":bin_test" ] | |
| } | |
| fuchsia_package("httpsdate-time-source") { | |
| deps = [ ":service" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":httpsdate-time-source-tests" ] | |
| } |