blob: e5d4e8aaaed95213fdfd71c0bfa290b81a581d19 [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 = [ "utc.fidl" ]
public_deps = [ "//zircon/vdso/zx" ]
}
package("timekeeper") {
meta = [
{
path = "meta/service.cmx"
dest = "timekeeper.cmx"
},
]
deps = [
":bin",
":timekeeper_config",
]
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",
"//sdk/fidl/fuchsia.deprecatedtimezone:fuchsia.deprecatedtimezone-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/inspect/rust/fuchsia-inspect",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:log",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:thiserror",
"//zircon/system/fidl/fuchsia-net:fuchsia-net-rustc",
]
}
test_package("timekeeper_bin_test") {
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
deps = [ ":timekeeper_bin_test" ]
}