blob: 69a3b8891b94fd03e0dd8f614f49031542c4b4bd [file] [log] [blame]
# Copyright 2017 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/package.gni")
import("//build/testing/environments.gni")
package("network_time") {
deps = [
":bin",
]
binary = "network_time"
resources = [
{
path = rebase_path("roughtime-servers.json")
dest = "roughtime-servers.json"
},
]
meta = [
{
path = rebase_path("meta/network_time.cmx")
dest = "network_time.cmx"
},
]
}
package("network_time_tests") {
testonly = true
deps = [
":tests",
]
tests = [
{
name = "network_time_tests"
environments = basic_envs
},
]
}
source_set("lib") {
sources = [
"roughtime_server.cc",
"roughtime_server.h",
"time_server_config.cc",
"time_server_config.h",
"timezone.cc",
"timezone.h",
]
deps = [
":time_util_lib",
"//garnet/public/lib/syslog/cpp",
"//src/lib/fxl",
"//third_party/boringssl",
"//third_party/rapidjson",
"//third_party/roughtime:client_lib",
"//zircon/public/fidl/fuchsia-hardware-rtc",
"//zircon/public/lib/fdio",
"//zircon/public/lib/fit",
"//zircon/public/lib/zx",
]
}
executable("bin") {
output_name = "network_time"
sources = [
"main.cc",
]
deps = [
":lib",
"//garnet/public/lib/fsl",
"//src/lib/fxl",
]
}
static_library("time_util_lib") {
output_name = "time_util_lib"
sources = [
"time_util.cc",
"time_util.h",
]
deps = [
"//zircon/public/fidl/fuchsia-hardware-rtc",
]
}
executable("tests") {
output_name = "network_time_tests"
testonly = true
sources = [
"roughtime_server_test.cc",
"time_server_config_test.cc",
]
deps = [
":lib",
"//src/lib/files",
"//src/lib/fxl",
"//third_party/boringssl",
"//third_party/googletest:gtest_main",
"//third_party/roughtime:client_lib",
"//zircon/public/lib/zx",
]
}