blob: 93db1f55b18f09d8f4f0920625a1b1a2c16858bd [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/test/test_package.gni")
source_set("timekeeper") {
sources = [ "clock.h" ]
public_deps = [ "//zircon/public/lib/zx" ]
public_configs = [ "//garnet/public:config" ]
}
source_set("system") {
sources = [ "system_clock.h" ]
public_deps = [
":timekeeper",
"//zircon/public/lib/zx",
]
}
source_set("testing") {
testonly = true
sources = [
"async_test_clock.cc",
"async_test_clock.h",
"monotonic_test_clock_base.cc",
"monotonic_test_clock_base.h",
"test_clock.cc",
"test_clock.h",
"test_loop_test_clock.cc",
"test_loop_test_clock.h",
]
public_deps = [
":timekeeper",
"//zircon/public/lib/async-cpp",
"//zircon/public/lib/fit",
"//zircon/system/ulib/async-testing",
]
}
executable("timekeeper_lib_unittests") {
testonly = true
sources = [
"async_test_clock_unittest.cc",
"system_clock_unittest.cc",
"test_clock_unittest.cc",
"test_loop_test_clock_unittest.cc",
]
deps = [
":system",
":testing",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//third_party/googletest:gtest",
"//zircon/system/ulib/async-testing",
]
}
unittest_package("timekeeper_lib_tests") {
deps = [ ":timekeeper_lib_unittests" ]
tests = [
{
name = "timekeeper_lib_unittests"
environments = [ emu_env ]
},
]
}
group("tests") {
testonly = true
deps = [ ":timekeeper_lib_tests" ]
}