blob: 5df5b7c30c36833c43b869e5c907c57b411e3a25 [file] [log] [blame]
# Copyright 2018 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/test/test_package.gni")
group("tests") {
testonly = true
deps = [ ":network-time-service-tests" ]
}
group("network_time_service") {
deps = [ ":network-time-service" ]
}
source_set("lib") {
sources = [
"inspect.cc",
"inspect.h",
"service.cc",
"service.h",
"watcher.h",
]
public_deps = [
"//sdk/fidl/fuchsia.time.external",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/inspect/cpp",
"//sdk/lib/syslog/cpp",
"//src/lib/fxl",
"//src/sys/time/lib/network_time:lib",
"//third_party/roughtime:client_lib",
"//zircon/public/lib/fbl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
executable("bin") {
output_name = "network_time_service"
sources = [ "main.cc" ]
deps = [
":lib",
"//sdk/lib/sys/cpp",
"//src/lib/fsl",
"//src/lib/fxl",
"//zircon/system/ulib/async-default",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
package("network-time-service") {
deps = [ ":bin" ]
resources = [
{
path = rebase_path("roughtime-servers.json")
dest = "roughtime-servers.json"
},
]
binaries = [
{
name = "network_time_service"
},
]
meta = [
{
path = rebase_path("meta/network_time_service.cmx")
dest = "network_time_service.cmx"
},
]
}
test_package("network-time-service-tests") {
deps = [ ":network_time_service_unittests" ]
tests = [
{
name = "network_time_service_tests"
environments = basic_envs
},
]
}
executable("network_time_service_unittests") {
output_name = "network_time_service_tests"
testonly = true
sources = [
"inspect_test.cc",
"service_test.cc",
"watcher_test.cc",
]
deps = [
":lib",
"//garnet/public/lib/gtest",
"//sdk/lib/inspect/testing/cpp",
"//sdk/lib/sys/cpp/testing:unit",
"//src/lib/files",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/sys/time/lib/network_time/test:roughtime_test_lib",
"//third_party/boringssl",
"//third_party/roughtime:client_lib",
"//zircon/public/lib/zx",
]
}