| # 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/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| shared_library("lib") { |
| output_name = "fake_clock" |
| testonly = true |
| sources = [ "fake_clock.cc" ] |
| |
| deps = [ |
| "//src/lib/fake-clock/fidl:fidl_llcpp", |
| "//src/lib/fxl", |
| "//zircon/public/lib/fdio", |
| ] |
| } |
| |
| executable("test_bin") { |
| testonly = true |
| output_name = "fake_clock_lib_test" |
| sources = [ "fake_clock_test.cc" ] |
| |
| deps = [ |
| ":lib", |
| "//garnet/public/lib/gtest", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fake-clock/fidl", |
| "//src/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| ] |
| } |
| |
| test_package("fake_clock_lib_test") { |
| deps = [ ":test_bin" ] |
| |
| tests = [ |
| { |
| name = "fake_clock_lib_test" |
| environments = [ qemu_env ] |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fake_clock_lib_test" ] |
| } |