| # 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/bind/bind.gni") |
| import("//build/components.gni") |
| import("//build/drivers.gni") |
| |
| driver_bind_rules("bt-hci-emulator-bind") { |
| rules = "bt-hci-emulator.bind" |
| header_output = "bt-hci-emulator-bind.h" |
| tests = "bind-tests.json" |
| deps = [ "//src/devices/bind/fuchsia.platform" ] |
| } |
| |
| fuchsia_driver("fuchsia_driver") { |
| output_name = "bt-hci-emulator" |
| testonly = true |
| |
| sources = [ |
| "controller.h", |
| "device.cc", |
| "device.h", |
| "driver.cc", |
| "log.h", |
| "peer.cc", |
| "peer.h", |
| ] |
| |
| deps = [ |
| ":bt-hci-emulator-bind", |
| "//sdk/banjo/fuchsia.hardware.test:fuchsia.hardware.test_banjo_cpp", |
| "//sdk/fidl/fuchsia.bluetooth.test", |
| "//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_c_client", |
| "//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_llcpp", |
| "//sdk/lib/fit-promise", |
| "//sdk/lib/syslog/cpp:backend_legacy", |
| "//src/connectivity/bluetooth/core/bt-host/fidl:helpers", |
| "//src/connectivity/bluetooth/core/bt-host/hci", |
| "//src/connectivity/bluetooth/core/bt-host/testing:fake_controller", |
| "//src/connectivity/bluetooth/lib/fidl", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zx", |
| ] |
| |
| # TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| |
| # TODO(fxbug.dev/95833): This target uses the deprecated C bindings. |
| # Consider switching to the C++ bindings. See linked bug for details. |
| configs += [ "//build/c:fidl-deprecated-c-bindings" ] |
| } |
| |
| fuchsia_driver_component("driver") { |
| testonly = true |
| component_name = "bt-hci-emulator" |
| deps = [ ":fuchsia_driver" ] |
| info = "driver-info.json" |
| colocate = true |
| } |
| |
| fuchsia_driver_package("emulator") { |
| testonly = true |
| |
| driver_components = [ ":driver" ] |
| |
| # This package is reachable from //src/connectivity/bluetooth |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bt-hci-emulator-bind_test" ] |
| } |