| # 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.cobalt:fuchsia.cobalt-rustc", | |
| "//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces-rustc", | |
| "//sdk/fidl/fuchsia.time.external:fuchsia.time.external-rustc", | |
| "//src/lib/cobalt/rust:fuchsia-cobalt", | |
| "//src/lib/diagnostics/inspect/rust", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//src/lib/fuchsia-runtime", | |
| "//src/lib/network/fidl_fuchsia_net_interfaces_ext", | |
| "//src/lib/syslog/rust:syslog", | |
| "//src/lib/zircon/rust:fuchsia-zircon", | |
| "//src/sys/time/lib/httpdate-hyper", | |
| "//src/sys/time/lib/push-source", | |
| "//src/sys/time/lib/time-util", | |
| "//src/sys/time/lib/time_metrics_registry", | |
| "//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", | |
| "//third_party/rust_crates:parking_lot", | |
| "//third_party/rust_crates:rand", | |
| ] | |
| sources = [ | |
| "src/bound.rs", | |
| "src/constants.rs", | |
| "src/datatypes.rs", | |
| "src/diagnostics/cobalt.rs", | |
| "src/diagnostics/composite.rs", | |
| "src/diagnostics/fake.rs", | |
| "src/diagnostics/inspect.rs", | |
| "src/diagnostics/mod.rs", | |
| "src/httpsdate.rs", | |
| "src/main.rs", | |
| "src/sampler.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" ] | |
| test_specs = { | |
| log_settings = { | |
| max_severity = "ERROR" | |
| } | |
| } | |
| } | |
| fuchsia_package("httpsdate-time-source") { | |
| deps = [ ":service" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":httpsdate-time-source-tests" ] | |
| } |