blob: 273ff76ea97592af66660b0a2ede27c965e39fc0 [file] [log] [blame]
# 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("thermal-cli") {
visibility = [ ":*" ]
sources = [ "main.cc" ]
deps = [
":common",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp",
"//sdk/lib/component/incoming/cpp",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zx",
]
}
bootfs_files_for_assembly("bootfs") {
deps = [ ":thermal-cli" ]
}
source_set("common") {
sources = [
"thermal-cli.cc",
"thermal-cli.h",
]
deps = [
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/zx",
]
}
test("thermal-cli-test-bin") {
output_name = "thermal-cli-test"
sources = [ "test/thermal-cli-test.cc" ]
include_dirs = [ "." ]
deps = [
":common",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp",
"//sdk/lib/driver/runtime/testing/cpp",
"//src/devices/bin/driver_runtime",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/mock-function",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("thermal-cli-test") {
deps = [ ":thermal-cli-test-bin" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [ ":thermal-cli-test" ]
}