| # Copyright 2020 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("gpioutil") { |
| visibility = [ ":*" ] |
| sources = [ |
| "gpioutil.cc", |
| "main.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.gpio:fuchsia.hardware.gpio_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/fdio", |
| "//src/lib/ddk", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| bootfs_files_for_assembly("bootfs") { |
| deps = [ ":gpioutil" ] |
| } |
| |
| test("gpioutil-test-bin") { |
| output_name = "gpioutil-test" |
| sources = [ |
| "gpioutil.cc", |
| "test/gpioutil-test.cc", |
| ] |
| include_dirs = [ "." ] |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.gpio:fuchsia.hardware.gpio_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/fdio", |
| "//src/lib/ddk", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/mock-function", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("gpioutil-test") { |
| deps = [ ":gpioutil-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":gpioutil-test" ] |
| } |