| # 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/assembly/bootfs_files_for_assembly.gni") |
| import("//build/components.gni") |
| import("//build/test.gni") |
| |
| executable("cpuctl") { |
| visibility = [ ":*" ] |
| sources = [ |
| "cpuctl.cc", |
| "performance-domain.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.device:fuchsia.device_cpp", |
| "//sdk/fidl/fuchsia.hardware.cpu.ctrl:fuchsia.hardware.cpu.ctrl_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/fit", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| bootfs_files_for_assembly("bootfs") { |
| deps = [ ":cpuctl" ] |
| } |
| |
| test("cpuctl-test-bin") { |
| output_name = "cpuctl-test" |
| sources = [ |
| "cpuctl-test.cc", |
| "performance-domain.cc", |
| ] |
| include_dirs = [ "." ] |
| deps = [ |
| "//sdk/fidl/fuchsia.device:fuchsia.device_cpp_testing", |
| "//sdk/fidl/fuchsia.device.manager:fuchsia.device.manager_cpp_testing", |
| "//sdk/fidl/fuchsia.hardware.cpu.ctrl:fuchsia.hardware.cpu.ctrl_cpp_testing", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/fidl/cpp/wire", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("cpuctl-test") { |
| deps = [ ":cpuctl-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":cpuctl-test" ] |
| } |