blob: 0eb40ad9ed6960fd5cb87eeb76035bf10417f897 [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") {
# TODO(fxb/35879): Remove lint exclusions by fixing known FIDL lint violations in this target
excluded_checks = [ "event-names-must-start-with-on" ]
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-syslog",
"//garnet/public/rust/fuchsia-zircon",
"//sdk/fidl/fuchsia.timezone:fuchsia.timezone-rustc",
"//src/lib/inspect/rust/fuchsia-inspect",
"//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/system/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"
},
{
path = "test/end-of-unix-time"
dest = "end-of-unix-time"
},
]
}
group("tests") {
testonly = true
public_deps = [
":timekeeper_bin_test",
]
}