| # 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/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| import("//src/sys/build/components.gni") |
| |
| driver_module("bt-transport-usb") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [] |
| deps = [ ":common" ] |
| } |
| |
| source_set("common") { |
| sources = [ "bt-transport-usb.c" ] |
| public_deps = [ |
| "//sdk/banjo/fuchsia.hardware.bt.hci", |
| "//sdk/banjo/fuchsia.hardware.usb", |
| "//sdk/banjo/fuchsia.hardware.usb.composite", |
| "//sdk/banjo/fuchsia.hardware.usb.request", |
| "//src/devices/lib/driver", |
| "//src/devices/usb/lib/usb", |
| "//src/lib/listnode", |
| |
| # TODO(fxb/38132): Migrate to the new bind rules and delete the below |
| "//src/lib/ddk:ddk-deprecated-binding-headers", |
| "//zircon/public/lib/sync", |
| ] |
| } |
| |
| test("bt-transport-usb-test") { |
| sources = [ "bt-transport-usb-test.cc" ] |
| deps = [ |
| ":common", |
| "//sdk/lib/fdio", |
| "//src/devices/testing/fake_ddk", |
| "//src/devices/usb/testing/descriptor-builder", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("bt-transport-usb-package") { |
| deps = [ ":bt-transport-usb-test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bt-transport-usb-package" ] |
| } |