From d0a90cd215d657fb2ee3240310fdcb3b0f1c1819 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 28 Aug 2024 22:53:55 +0000 Subject: [PATCH] pw_bluetooth_sapphire: Add remaining host tests to infra build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id2e0ca8a8b3eb1834871295809654db96e4335ca Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/232038 Reviewed-by: Faraaz Sareshwala Lint: Lint 🤖 Commit-Queue: Darren Chan --- pw_bluetooth_sapphire/fuchsia/BUILD.bazel | 30 ++++++++----------- pw_bluetooth_sapphire/host/att/BUILD.bazel | 1 + pw_bluetooth_sapphire/host/gap/BUILD.bazel | 1 + pw_bluetooth_sapphire/host/gatt/BUILD.bazel | 26 ++++++++-------- .../host/hci-spec/BUILD.bazel | 1 + pw_bluetooth_sapphire/host/hci/BUILD.bazel | 1 + pw_bluetooth_sapphire/host/iso/BUILD.bazel | 1 + pw_bluetooth_sapphire/host/l2cap/BUILD.bazel | 1 + pw_bluetooth_sapphire/host/sco/BUILD.bazel | 1 + pw_bluetooth_sapphire/host/sdp/BUILD.bazel | 3 +- pw_bluetooth_sapphire/host/sm/BUILD.bazel | 5 ++-- .../host/testing/BUILD.bazel | 1 + .../host/transport/BUILD.bazel | 3 +- 13 files changed, 39 insertions(+), 36 deletions(-) diff --git a/pw_bluetooth_sapphire/fuchsia/BUILD.bazel b/pw_bluetooth_sapphire/fuchsia/BUILD.bazel index b3b76590a4..d3b501be7e 100644 --- a/pw_bluetooth_sapphire/fuchsia/BUILD.bazel +++ b/pw_bluetooth_sapphire/fuchsia/BUILD.bazel @@ -28,7 +28,19 @@ license( qemu_tests = [ "//pw_bluetooth_sapphire/fuchsia/bt_host:unittest_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/att:test_pkg", "//pw_bluetooth_sapphire/fuchsia/host/common:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/gap:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/gatt:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/hci:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/hci-spec:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/iso:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/l2cap:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/sco:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/sdp:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/sm:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/testing:test_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/transport:test_pkg", ] fuchsia_test_group( @@ -43,24 +55,6 @@ fuchsia_test_group( # buildifier: leave-alone fuchsia_builder_group( name = "infra", - build_only = [ - # TODO: https://pwbug.dev/360411906 - Reenable once we can specify the - # correct build configuration for these tests. - # Then, move to `qemu_tests`. - # "//pw_bluetooth_sapphire/fuchsia/host/att:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/common:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/gap:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/gatt:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/hci:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/hci-spec:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/iso:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/l2cap:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/sco:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/sdp:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/sm:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/testing:test_pkg", - # "//pw_bluetooth_sapphire/fuchsia/host/transport:test_pkg", - ], test_groups = [ ":tests_qemu", ], diff --git a/pw_bluetooth_sapphire/host/att/BUILD.bazel b/pw_bluetooth_sapphire/host/att/BUILD.bazel index b652e6adb7..f19c438684 100644 --- a/pw_bluetooth_sapphire/host/att/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/att/BUILD.bazel @@ -70,4 +70,5 @@ cc_library( "//pw_bluetooth_sapphire/host/l2cap:testing", "//pw_bluetooth_sapphire/host/testing:gtest_main", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/gap/BUILD.bazel b/pw_bluetooth_sapphire/host/gap/BUILD.bazel index bbdd15178d..b6338eb760 100644 --- a/pw_bluetooth_sapphire/host/gap/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/gap/BUILD.bazel @@ -136,4 +136,5 @@ cc_library( "//pw_bluetooth_sapphire/host/testing", "//pw_bluetooth_sapphire/host/testing:gtest_main", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/gatt/BUILD.bazel b/pw_bluetooth_sapphire/host/gatt/BUILD.bazel index 732d1bba40..a6d8140982 100644 --- a/pw_bluetooth_sapphire/host/gatt/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/gatt/BUILD.bazel @@ -52,20 +52,6 @@ cc_library( ], ) -# Bazel support for pw_bluetooth_sapphire has not been configured for all -# files yet, but must be enumerated to satisfy presubmit. -filegroup( - name = "_files", - srcs = [ - "client_test.cc", - "gatt_test.cc", - "generic_attribute_service_test.cc", - "local_service_manager_test.cc", - "remote_service_manager_test.cc", - "server_test.cc", - ], -) - cc_library( name = "testing", testonly = True, @@ -91,10 +77,22 @@ cc_library( name = "gatt_test.lib", testonly = True, srcs = [ + "client_test.cc", + "gatt_test.cc", + "generic_attribute_service_test.cc", + "local_service_manager_test.cc", + "remote_service_manager_test.cc", + "server_test.cc", ], tags = ["manual"], visibility = ["//visibility:public"], deps = [ + ":gatt", + ":testing", + "//pw_bluetooth_sapphire/host/att", + "//pw_bluetooth_sapphire/host/l2cap:testing", + "//pw_bluetooth_sapphire/host/testing", "//pw_bluetooth_sapphire/host/testing:gtest_main", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/hci-spec/BUILD.bazel b/pw_bluetooth_sapphire/host/hci-spec/BUILD.bazel index 7266e2d03d..73d2e5b15c 100644 --- a/pw_bluetooth_sapphire/host/hci-spec/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/hci-spec/BUILD.bazel @@ -46,4 +46,5 @@ cc_library( ":hci-spec", "//pw_bluetooth_sapphire/host/testing:gtest_main", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/hci/BUILD.bazel b/pw_bluetooth_sapphire/host/hci/BUILD.bazel index 812aefff88..416397a530 100644 --- a/pw_bluetooth_sapphire/host/hci/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/hci/BUILD.bazel @@ -94,4 +94,5 @@ cc_library( "//pw_bluetooth_sapphire/host/testing:gtest_main", "@pigweed//pw_bluetooth:emboss_hci_test", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/iso/BUILD.bazel b/pw_bluetooth_sapphire/host/iso/BUILD.bazel index 348f0fdcdd..ec1fdab3d5 100644 --- a/pw_bluetooth_sapphire/host/iso/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/iso/BUILD.bazel @@ -48,4 +48,5 @@ cc_library( "//pw_bluetooth_sapphire/host/testing", "//pw_bluetooth_sapphire/host/testing:gtest_main", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/l2cap/BUILD.bazel b/pw_bluetooth_sapphire/host/l2cap/BUILD.bazel index 50f9da3b8f..47c4f4c721 100644 --- a/pw_bluetooth_sapphire/host/l2cap/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/l2cap/BUILD.bazel @@ -161,4 +161,5 @@ cc_library( "//pw_bluetooth_sapphire/host/transport:testing", "@pigweed//pw_async:fake_dispatcher_fixture", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/sco/BUILD.bazel b/pw_bluetooth_sapphire/host/sco/BUILD.bazel index 2717c13e58..40e8926f14 100644 --- a/pw_bluetooth_sapphire/host/sco/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/sco/BUILD.bazel @@ -47,4 +47,5 @@ cc_library( "//pw_bluetooth_sapphire/host/testing:gtest_main", "//pw_bluetooth_sapphire/host/transport:testing", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/sdp/BUILD.bazel b/pw_bluetooth_sapphire/host/sdp/BUILD.bazel index fc66befbee..73a2c1b04c 100644 --- a/pw_bluetooth_sapphire/host/sdp/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/sdp/BUILD.bazel @@ -46,7 +46,7 @@ cc_library( ) cc_library( - name = "_test.lib", + name = "sdp_test.lib", testonly = True, srcs = [ "client_test.cc", @@ -65,4 +65,5 @@ cc_library( "//pw_bluetooth_sapphire/host/testing", "//pw_bluetooth_sapphire/host/testing:gtest_main", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/sm/BUILD.bazel b/pw_bluetooth_sapphire/host/sm/BUILD.bazel index f51c808d30..0219a655f8 100644 --- a/pw_bluetooth_sapphire/host/sm/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/sm/BUILD.bazel @@ -55,7 +55,7 @@ cc_library( "//pw_bluetooth_sapphire/host/gap:definitions", "//pw_bluetooth_sapphire/host/hci", "//pw_bluetooth_sapphire/host/l2cap", - "@boringssl//:bssl", + "@boringssl//:crypto", "@pigweed//pw_string", "@pigweed//third_party/fuchsia:fit", ], @@ -74,7 +74,7 @@ cc_library( ) cc_library( - name = "_test.lib", + name = "sm_test.lib", testonly = True, srcs = [ "ecdh_key_test.cc", @@ -104,4 +104,5 @@ cc_library( "//pw_bluetooth_sapphire/host/testing", "//pw_bluetooth_sapphire/host/testing:gtest_main", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/testing/BUILD.bazel b/pw_bluetooth_sapphire/host/testing/BUILD.bazel index aeba21eddb..f6c81d9a14 100644 --- a/pw_bluetooth_sapphire/host/testing/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/testing/BUILD.bazel @@ -194,4 +194,5 @@ cc_library( "//pw_bluetooth_sapphire/host/l2cap:testing", "//pw_bluetooth_sapphire/host/testing:gtest_main", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/transport/BUILD.bazel b/pw_bluetooth_sapphire/host/transport/BUILD.bazel index 3e8419e52d..c19ff57b6c 100644 --- a/pw_bluetooth_sapphire/host/transport/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/transport/BUILD.bazel @@ -80,7 +80,7 @@ filegroup( ) cc_library( - name = "_test.lib", + name = "transport_test.lib", testonly = True, srcs = [ "acl_data_channel_test.cc", @@ -101,4 +101,5 @@ cc_library( "//pw_bluetooth_sapphire/host/testing", "//pw_bluetooth_sapphire/host/testing:gtest_main", ], + alwayslink = 1, )