| # 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/components.gni") |
| import("//build/test.gni") |
| |
| executable("thermal-cli") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "main.cc" ] |
| deps = [ |
| ":common", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c", |
| "//sdk/lib/fdio", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| source_set("common") { |
| sources = [ |
| "thermal-cli.cc", |
| "thermal-cli.h", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/fzl", |
| ] |
| } |
| |
| test("thermal-cli-test-bin") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| output_name = "thermal-cli-test" |
| sources = [ "test/thermal-cli-test.cc" ] |
| include_dirs = [ "." ] |
| deps = [ |
| ":common", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c", |
| "//sdk/lib/fdio", |
| "//zircon/public/lib/mock-function", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fidl-utils", |
| ] |
| } |
| |
| fuchsia_unittest_package("thermal-cli-test") { |
| deps = [ ":thermal-cli-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":thermal-cli-test" ] |
| } |