| # Copyright 2023 The Pigweed Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| # use this file except in compliance with the License. You may obtain a copy of |
| # the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| # License for the specific language governing permissions and limitations under |
| # the License. |
| |
| 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/advertising_report_parser.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/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", |
| "$dir_public_hci/util.h", |
| ] |
| |
| sources = [ |
| "acl_connection.cc", |
| "advertising_handle_map.cc", |
| "advertising_report_parser.cc", |
| "android_extended_low_energy_advertiser.cc", |
| "bredr_connection.cc", |
| "bredr_connection_request.cc", |
| "connection.cc", |
| "extended_low_energy_advertiser.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", |
| "util.cc", |
| ] |
| |
| public_deps = [ |
| "$dir_pw_async:heap_dispatcher", |
| "$dir_pw_bluetooth:emboss_hci_group", |
| "$dir_pw_bluetooth_sapphire/host/transport", |
| "$dir_pw_third_party/fuchsia:fit", |
| ] |
| |
| public_configs = [ "$dir_pw_bluetooth_sapphire:public_include_path" ] |
| } |
| |
| pw_source_set("testing") { |
| 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", |
| "advertising_report_parser_test.cc", |
| "command_handler_test.cc", |
| "connection_test.cc", |
| "extended_low_energy_advertiser_test.cc", |
| "legacy_low_energy_advertiser_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", |
| "util_test.cc", |
| ] |
| |
| deps = [ |
| ":testing", |
| "$dir_pw_bluetooth:emboss_hci_test", |
| "$dir_pw_bluetooth_sapphire/host/testing", |
| ] |
| |
| test_main = "$dir_pw_bluetooth_sapphire/host/testing:gtest_main" |
| } |