blob: 162de18f48ef4241b65159b287395f7550ba0396 [file] [log] [blame]
# Copyright 2017 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/fuzzing/fuzzer.gni")
import("//src/connectivity/bluetooth/core/bt-host/build/bt_gtest_package.gni")
static_library("hci") {
sources = [
"acl_connection.cc",
"acl_connection.h",
"advertising_handle_map.cc",
"advertising_report_parser.cc",
"advertising_report_parser.h",
"android_extended_low_energy_advertiser.cc",
"android_extended_low_energy_advertiser.h",
"bredr_connection.cc",
"bredr_connection.h",
"bredr_connection_request.cc",
"bredr_connection_request.h",
"command_handler.h",
"connection.cc",
"connection.h",
"extended_low_energy_advertiser.cc",
"extended_low_energy_advertiser.h",
"legacy_low_energy_advertiser.cc",
"legacy_low_energy_advertiser.h",
"legacy_low_energy_scanner.cc",
"legacy_low_energy_scanner.h",
"local_address_delegate.h",
"low_energy_advertiser.cc",
"low_energy_advertiser.h",
"low_energy_connection.cc",
"low_energy_connection.h",
"low_energy_connector.cc",
"low_energy_connector.h",
"low_energy_scanner.cc",
"low_energy_scanner.h",
"sco_connection.cc",
"sco_connection.h",
"sequential_command_runner.cc",
"sequential_command_runner.h",
"util.cc",
"util.h",
]
public_deps = [
"//sdk/banjo/fuchsia.hardware.bt.hci:fuchsia.hardware.bt.hci_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.bt.vendor:fuchsia.hardware.bt.vendor_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_c",
"//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_c_client",
"//sdk/lib/fdio",
"//sdk/lib/fit",
"//sdk/lib/fit-promise",
"//src/connectivity/bluetooth/core/bt-host/transport",
"//src/lib/ddk",
"//src/lib/files",
"//src/lib/fxl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/trace:trace-driver",
]
# TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
source_set("testing") {
testonly = true
sources = [
"fake_bredr_connection.cc",
"fake_bredr_connection.h",
"fake_local_address_delegate.cc",
"fake_local_address_delegate.h",
"fake_low_energy_connection.cc",
"fake_low_energy_connection.h",
"fake_sco_connection.cc",
"fake_sco_connection.h",
]
public_deps = [ ":hci" ]
deps = [ "//src/lib/fxl" ]
}
source_set("tests") {
testonly = true
sources = [
"advertising_handle_map_unittest.cc",
"advertising_report_parser_unittest.cc",
"command_handler_unittest.cc",
"connection_unittest.cc",
"extended_low_energy_advertiser_unittest.cc",
"legacy_low_energy_advertiser_unittest.cc",
"legacy_low_energy_scanner_unittest.cc",
"low_energy_advertiser_unittest.cc",
"low_energy_connector_unittest.cc",
"low_energy_multiple_advertising_unittest.cc",
"sequential_command_runner_unittest.cc",
"util_unittest.cc",
]
deps = [
":testing",
"//src/connectivity/bluetooth/core/bt-host/testing",
"//third_party/googletest:gtest",
]
# 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" ]
}
bt_gtest_package("bt-host-hci-tests") {
with_death_tests = true
deps = [ ":tests" ]
}