| # Copyright 2023 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/components.gni") |
| import("//build/test.gni") |
| |
| source_set("common") { |
| sources = [ "fan-controller.cc" ] |
| public_deps = [ |
| "//sdk/fidl/fuchsia.hardware.fan:fuchsia.hardware.fan_cpp", |
| "//sdk/fidl/fuchsia.thermal:fuchsia.thermal_cpp", |
| "//sdk/lib/component/incoming/cpp:cpp", |
| "//sdk/lib/sys/cpp:cpp", |
| "//sdk/lib/syslog/cpp:cpp", |
| "//src/lib/fsl", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| executable("fan-controller-bin") { |
| sources = [ "main.cc" ] |
| deps = [ ":common" ] |
| } |
| |
| fuchsia_package_with_single_component("fan-controller") { |
| manifest = "meta/fan-controller.cml" |
| deps = [ ":fan-controller-bin" ] |
| } |
| |
| test("fan-controller-test-bin") { |
| output_name = "fan-controller-test" |
| sources = [ "fan-controller-test.cc" ] |
| deps = [ |
| ":common", |
| "//src/lib/storage/vfs/cpp", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("fan-controller-test") { |
| deps = [ ":fan-controller-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fan-controller-test" ] |
| } |