From 495ac11f580ca6b8cbbe8a7b2af806150980bbd1 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 4 Sep 2024 22:53:25 +0000 Subject: [PATCH] pw_bluetooth_sapphire: Add common 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: Ia1cb81efa5a9996e7255ac2675fc350ef9a8ede6 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/234032 Pigweed-Auto-Submit: Ben Lawson Lint: Lint 🤖 Commit-Queue: Auto-Submit Reviewed-by: Faraaz Sareshwala --- pw_bluetooth_sapphire/host/common/BUILD.bazel | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pw_bluetooth_sapphire/host/common/BUILD.bazel b/pw_bluetooth_sapphire/host/common/BUILD.bazel index fb07dfacfb..eecaf8345e 100644 --- a/pw_bluetooth_sapphire/host/common/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/common/BUILD.bazel @@ -12,6 +12,7 @@ # 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"]) @@ -77,9 +78,8 @@ cc_library( deps = [":common"], ) -cc_library( - name = "common_test.lib", - testonly = True, +pw_cc_test( + name = "common_test", srcs = [ "advertising_data_test.cc", "bounded_inspect_list_node_test.cc", @@ -102,14 +102,11 @@ cc_library( "windowed_inspect_numeric_property_test.cc", ], copts = COPTS, - tags = ["manual"], - visibility = ["//visibility:public"], + test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main", deps = [ ":common", ":uuid_string_util", "//pw_bluetooth_sapphire/host/testing", - "//pw_bluetooth_sapphire/host/testing:gtest_main", "@pigweed//pw_async:fake_dispatcher_fixture", ], - alwayslink = 1, )