| # 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") |
| |
| group("test") { |
| testonly = true |
| deps = [ ":simplehid" ] |
| } |
| |
| test("simplehid") { |
| output_name = "simplehid-test" |
| if (is_fuchsia) { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| } |
| if (is_fuchsia) { |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| configs += [ "//build/config:all_source" ] |
| sources = [ "simplehid-test.cc" ] |
| deps = [ |
| "//sdk/banjo/fuchsia.hardware.hidbus", |
| "//sdk/lib/fdio", |
| "//sdk/lib/fit", |
| "//src/devices/lib/driver", |
| "//src/devices/testing/no_ddk", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/simplehid", |
| ] |
| } |
| |
| fuchsia_unittest_package("simplehid-test-pkg") { |
| package_name = "simplehid-test" |
| deps = [ ":simplehid" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":simplehid-test-pkg" ] |
| } |