blob: aee783c33708bcbee3beb02a39cdf97c18e70f1e [file] [log] [blame]
# 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/fidl/fidl.gni")
import("//build/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
fidl("fuchsia.time") {
sources = [
"deprecated_network_sync.fidl",
"utc.fidl",
]
}
package("timekeeper") {
meta = [
{
path = "meta/service.cmx"
dest = "timekeeper.cmx"
},
]
public_deps = [
":timekeeper_config",
]
deps = [
":bin",
]
binaries = [
{
name = "timekeeper"
},
]
}
config_data("timekeeper_config") {
for_pkg = "sysmgr"
outputs = [
"timekeeper.config",
]
sources = [
"service.config",
]
}
rustc_binary("bin") {
name = "timekeeper"
edition = "2018"
with_unit_tests = true
deps = [
":fuchsia.time-rustc",
"//garnet/public/lib/fidl/rust/fidl",
"//garnet/public/rust/fuchsia-async",
"//garnet/public/rust/fuchsia-component",
"//garnet/public/rust/fuchsia-inspect",
"//garnet/public/rust/fuchsia-syslog",
"//garnet/public/rust/fuchsia-zircon",
"//sdk/fidl/fuchsia.timezone:fuchsia.timezone-rustc",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:failure",
"//third_party/rust_crates:futures-preview",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:log",
"//third_party/rust_crates:parking_lot",
"//zircon/public/fidl/fuchsia-net:fuchsia-net-rustc",
]
}
test_package("timekeeper_bin_test") {
public_deps = [
":bin_test",
]
tests = [
{
name = "timekeeper_bin_test"
environments = basic_envs
},
]
resources = [
{
path = "test/y2k"
dest = "y2k"
},
]
}
group("tests") {
testonly = true
public_deps = [
":timekeeper_bin_test",
]
}