From 53395847ef97c1f24f830fdf94cb7970be20a780 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 4 Sep 2024 23:23:40 +0000 Subject: [PATCH] pw_bluetooth_sapphire: Add hci Bazel unit test target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: b/359241441 Test: bazel test //pw_bluetooth_sapphire/host/... --platforms=//pw_unit_test:googletest_platform --@pigweed//pw_unit_test:backend=@pigweed//pw_unit_test:googletest Change-Id: I4cd5043ff9c13fceca80cfee64011ab9cd191e9f Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/234033 Pigweed-Auto-Submit: Ben Lawson Commit-Queue: Auto-Submit Lint: Lint 🤖 Reviewed-by: Faraaz Sareshwala --- pw_bluetooth_sapphire/host/hci/BUILD.bazel | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pw_bluetooth_sapphire/host/hci/BUILD.bazel b/pw_bluetooth_sapphire/host/hci/BUILD.bazel index 416397a530..d5bf8527df 100644 --- a/pw_bluetooth_sapphire/host/hci/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/hci/BUILD.bazel @@ -11,6 +11,8 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations under # the License. + +load("@pigweed//pw_build:pigweed.bzl", "pw_cc_test") load("//pw_bluetooth_sapphire/host:variables.bzl", "COPTS") package(default_visibility = ["//visibility:public"]) @@ -96,3 +98,28 @@ cc_library( ], alwayslink = 1, ) + +pw_cc_test( + name = "hci-spec_test", + srcs = [ + "advertising_handle_map_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", + ], + copts = COPTS, + test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main", + deps = [ + ":hci", + ":testing", + "//pw_bluetooth_sapphire/host/testing", + "@pigweed//pw_bluetooth:emboss_hci_test", + ], +)