blob: 6abb66c53bd1d07b462281864c44a7eacb68fe8a [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.deprecatedtimezone:fuchsia.deprecatedtimezone-rustc",
"//src/lib/inspect/rust/fuchsia-inspect",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:failure",
"//third_party/rust_crates:futures",
"//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",
]
}