| # Copyright 2018 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") |
| |
| source_set("lib") { |
| sources = [ |
| "app.cc", |
| "app.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.scpi", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl", |
| "//zircon/public/banjo/ddk.protocol.scpi", |
| "//zircon/public/fidl/fuchsia-hardware-thermal:fuchsia-hardware-thermal_c", |
| "//zircon/public/fidl/fuchsia-sysinfo:fuchsia-sysinfo_c", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "scpi" |
| |
| sources = [ |
| "main.cc", |
| ] |
| |
| deps = [ |
| ":lib", |
| "//zircon/public/lib/async-default", |
| "//zircon/public/lib/async-loop-cpp", |
| ] |
| } |
| |
| executable("scpi_unittests") { |
| testonly = true |
| |
| sources = [ |
| "app_unittest.cc", |
| ] |
| |
| deps = [ |
| ":lib", |
| "//garnet/public/lib/gtest", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| package("scpi") { |
| deps = [ |
| ":bin", |
| ] |
| meta = [ |
| { |
| path = rebase_path("meta/scpi.cmx") |
| dest = "scpi.cmx" |
| }, |
| ] |
| |
| binary = "scpi" |
| } |
| |
| unittest_package("scpi_server_tests") { |
| deps = [ |
| ":scpi_unittests", |
| ] |
| tests = [ |
| { |
| name = "scpi_unittests" |
| disabled = true |
| environments = basic_envs |
| }, |
| ] |
| } |