| # 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/bind/bind.gni") |
| import("//build/components.gni") |
| import("//build/drivers.gni") |
| import("//build/test.gni") |
| |
| driver_bind_rules("bind-fail-test-bind") { |
| rules = "bind-fail.bind" |
| } |
| |
| fuchsia_driver("fuchsia_driver") { |
| output_name = "bind-fail-test-driver" |
| |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ "driver.cc" ] |
| deps = [ |
| ":bind-fail-test-bind", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| ] |
| visibility = [ |
| ":*", |
| "//src/devices/bundles:drivers", |
| ] |
| } |
| |
| fuchsia_driver_component("driver") { |
| component_name = "bind-fail-test-driver" |
| deps = [ ":fuchsia_driver" ] |
| info = "driver-info.json" |
| manifest = "meta/driver.cml" |
| } |
| |
| test("tests") { |
| output_name = "bind-fail-test" |
| |
| testonly = true |
| sources = [ "test.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.device:fuchsia.device_cpp", |
| "//src/devices/testing/devmgr-integration-test-shim", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxtest", |
| ] |
| visibility = [ ":*" ] |
| } |
| |
| fuchsia_unittest_package("bind-fail-test") { |
| deps = [ |
| ":driver", |
| ":tests", |
| "//src/devices/misc/drivers/test", |
| "//src/devices/misc/drivers/test-parent", |
| ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |