blob: 0ef203181e27c5bbfb05c64868482fc4d830925f [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/test/test_package.gni")
import("//build/testing/environments.gni")
test_package("network_time_tests") {
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",
"//sdk/fidl/fuchsia.hardware.rtc",
"//sdk/lib/fdio",
"//sdk/lib/syslog/cpp",
"//sdk/lib/syslog/cpp:backend_legacy",
"//src/lib/fxl",
"//third_party/boringssl",
"//third_party/roughtime:client_lib",
"//zircon/public/lib/fit",
"//zircon/public/lib/zx",
# TODO(57392): Move it back to //third_party once unification completes.
"//zircon/third_party/rapidjson",
]
}
static_library("time_util_lib") {
output_name = "time_util_lib"
sources = [
"time_util.cc",
"time_util.h",
]
deps = [ "//sdk/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",
"//src/lib/fxl/test:gtest_main",
"//third_party/boringssl",
"//third_party/roughtime:client_lib",
"//zircon/public/lib/zx",
]
# TODO(46771): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
group("network_time") {
testonly = true
public_deps = [
":tests",
":time_util_lib",
]
}