Skip to content

Commit

Permalink
pw_bluetooth_sapphire: Add remaining host tests to infra build
Browse files Browse the repository at this point in the history
Change-Id: Id2e0ca8a8b3eb1834871295809654db96e4335ca
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/232038
Reviewed-by: Faraaz Sareshwala <[email protected]>
Lint: Lint 🤖 <[email protected]>
Commit-Queue: Darren Chan <[email protected]>
  • Loading branch information
BenjaminLawson authored and CQ Bot Account committed Aug 28, 2024
1 parent a99f4b8 commit d0a90cd
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 36 deletions.
30 changes: 12 additions & 18 deletions pw_bluetooth_sapphire/fuchsia/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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",
],
Expand Down
1 change: 1 addition & 0 deletions pw_bluetooth_sapphire/host/att/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ cc_library(
"//pw_bluetooth_sapphire/host/l2cap:testing",
"//pw_bluetooth_sapphire/host/testing:gtest_main",
],
alwayslink = 1,
)
1 change: 1 addition & 0 deletions pw_bluetooth_sapphire/host/gap/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,5 @@ cc_library(
"//pw_bluetooth_sapphire/host/testing",
"//pw_bluetooth_sapphire/host/testing:gtest_main",
],
alwayslink = 1,
)
26 changes: 12 additions & 14 deletions pw_bluetooth_sapphire/host/gatt/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
)
1 change: 1 addition & 0 deletions pw_bluetooth_sapphire/host/hci-spec/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ cc_library(
":hci-spec",
"//pw_bluetooth_sapphire/host/testing:gtest_main",
],
alwayslink = 1,
)
1 change: 1 addition & 0 deletions pw_bluetooth_sapphire/host/hci/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,5 @@ cc_library(
"//pw_bluetooth_sapphire/host/testing:gtest_main",
"@pigweed//pw_bluetooth:emboss_hci_test",
],
alwayslink = 1,
)
1 change: 1 addition & 0 deletions pw_bluetooth_sapphire/host/iso/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ cc_library(
"//pw_bluetooth_sapphire/host/testing",
"//pw_bluetooth_sapphire/host/testing:gtest_main",
],
alwayslink = 1,
)
1 change: 1 addition & 0 deletions pw_bluetooth_sapphire/host/l2cap/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,5 @@ cc_library(
"//pw_bluetooth_sapphire/host/transport:testing",
"@pigweed//pw_async:fake_dispatcher_fixture",
],
alwayslink = 1,
)
1 change: 1 addition & 0 deletions pw_bluetooth_sapphire/host/sco/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ cc_library(
"//pw_bluetooth_sapphire/host/testing:gtest_main",
"//pw_bluetooth_sapphire/host/transport:testing",
],
alwayslink = 1,
)
3 changes: 2 additions & 1 deletion pw_bluetooth_sapphire/host/sdp/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cc_library(
)

cc_library(
name = "_test.lib",
name = "sdp_test.lib",
testonly = True,
srcs = [
"client_test.cc",
Expand All @@ -65,4 +65,5 @@ cc_library(
"//pw_bluetooth_sapphire/host/testing",
"//pw_bluetooth_sapphire/host/testing:gtest_main",
],
alwayslink = 1,
)
5 changes: 3 additions & 2 deletions pw_bluetooth_sapphire/host/sm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand All @@ -74,7 +74,7 @@ cc_library(
)

cc_library(
name = "_test.lib",
name = "sm_test.lib",
testonly = True,
srcs = [
"ecdh_key_test.cc",
Expand Down Expand Up @@ -104,4 +104,5 @@ cc_library(
"//pw_bluetooth_sapphire/host/testing",
"//pw_bluetooth_sapphire/host/testing:gtest_main",
],
alwayslink = 1,
)
1 change: 1 addition & 0 deletions pw_bluetooth_sapphire/host/testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,5 @@ cc_library(
"//pw_bluetooth_sapphire/host/l2cap:testing",
"//pw_bluetooth_sapphire/host/testing:gtest_main",
],
alwayslink = 1,
)
3 changes: 2 additions & 1 deletion pw_bluetooth_sapphire/host/transport/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ filegroup(
)

cc_library(
name = "_test.lib",
name = "transport_test.lib",
testonly = True,
srcs = [
"acl_data_channel_test.cc",
Expand All @@ -101,4 +101,5 @@ cc_library(
"//pw_bluetooth_sapphire/host/testing",
"//pw_bluetooth_sapphire/host/testing:gtest_main",
],
alwayslink = 1,
)

0 comments on commit d0a90cd

Please sign in to comment.