| # 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/bazel/bazel_fuchsia_test_package.gni") |
| import("//build_overrides/pigweed.gni") |
| import("$dir_pw_unit_test/test.gni") |
| |
| dir_public_hci = "../public/pw_bluetooth_sapphire/internal/host/hci" |
| |
| pw_source_set("hci") { |
| public = [ |
| "$dir_public_hci/acl_connection.h", |
| "$dir_public_hci/android_extended_low_energy_advertiser.h", |
| "$dir_public_hci/bredr_connection.h", |
| "$dir_public_hci/bredr_connection_request.h", |
| "$dir_public_hci/command_handler.h", |
| "$dir_public_hci/connection.h", |
| "$dir_public_hci/extended_low_energy_advertiser.h", |
| "$dir_public_hci/extended_low_energy_scanner.h", |
| "$dir_public_hci/legacy_low_energy_advertiser.h", |
| "$dir_public_hci/legacy_low_energy_scanner.h", |
| "$dir_public_hci/local_address_delegate.h", |
| "$dir_public_hci/low_energy_advertiser.h", |
| "$dir_public_hci/low_energy_connection.h", |
| "$dir_public_hci/low_energy_connector.h", |
| "$dir_public_hci/low_energy_scanner.h", |
| "$dir_public_hci/sco_connection.h", |
| "$dir_public_hci/sequential_command_runner.h", |
| ] |
| |
| sources = [ |
| "acl_connection.cc", |
| "advertising_handle_map.cc", |
| "android_extended_low_energy_advertiser.cc", |
| "bredr_connection.cc", |
| "bredr_connection_request.cc", |
| "connection.cc", |
| "extended_low_energy_advertiser.cc", |
| "extended_low_energy_scanner.cc", |
| "legacy_low_energy_advertiser.cc", |
| "legacy_low_energy_scanner.cc", |
| "low_energy_advertiser.cc", |
| "low_energy_connection.cc", |
| "low_energy_connector.cc", |
| "low_energy_scanner.cc", |
| "sco_connection.cc", |
| "sequential_command_runner.cc", |
| ] |
| |
| public_deps = [ |
| "$dir_pw_async:heap_dispatcher", |
| "$dir_pw_bluetooth:emboss_hci_group", |
| "$dir_pw_third_party/fuchsia:fit", |
| "//src/connectivity/bluetooth/core/bt-host/transport", |
| ] |
| } |
| |
| pw_source_set("testing") { |
| testonly = true |
| |
| public = [ |
| "$dir_public_hci/fake_bredr_connection.h", |
| "$dir_public_hci/fake_local_address_delegate.h", |
| "$dir_public_hci/fake_low_energy_connection.h", |
| "$dir_public_hci/fake_sco_connection.h", |
| ] |
| |
| sources = [ |
| "fake_bredr_connection.cc", |
| "fake_local_address_delegate.cc", |
| "fake_low_energy_connection.cc", |
| "fake_sco_connection.cc", |
| ] |
| |
| deps = [ "$dir_pw_async:heap_dispatcher" ] |
| |
| public_deps = [ ":hci" ] |
| } |
| |
| pw_test("tests") { |
| sources = [ |
| "advertising_handle_map_test.cc", |
| "command_handler_test.cc", |
| "connection_test.cc", |
| "extended_low_energy_advertiser_test.cc", |
| "extended_low_energy_scanner_test.cc", |
| "legacy_low_energy_advertiser_test.cc", |
| "legacy_low_energy_scanner_test.cc", |
| "low_energy_advertiser_test.cc", |
| "low_energy_connector_test.cc", |
| "low_energy_multiple_advertising_test.cc", |
| "low_energy_scanner_test.cc", |
| "sequential_command_runner_test.cc", |
| ] |
| |
| deps = [ |
| ":testing", |
| "$dir_pw_bluetooth:emboss_hci_test", |
| "//src/connectivity/bluetooth/core/bt-host/testing", |
| ] |
| |
| test_main = "//src/connectivity/bluetooth/core/bt-host/testing:gtest_main" |
| } |
| |
| bazel_fuchsia_test_package("test_pkg") { |
| test_package_name = "hci_tests" |
| test_component_names = [ "hci_test_autogen_cml" ] |
| } |