diff --git a/pw_assert_fuchsia/BUILD.bazel b/pw_assert_fuchsia/BUILD.bazel index 6435dbe4a7..1f310eacc8 100644 --- a/pw_assert_fuchsia/BUILD.bazel +++ b/pw_assert_fuchsia/BUILD.bazel @@ -28,7 +28,9 @@ cc_library( "public/pw_assert_fuchsia/check_backend.h", ], includes = [ - "public_overrides", + "assert_public_overrides", + "check_public_overrides", + "public", ], target_compatible_with = ["@platforms//os:fuchsia"], deps = [ diff --git a/pw_bluetooth_sapphire/fuchsia/BUILD.bazel b/pw_bluetooth_sapphire/fuchsia/BUILD.bazel index 243d52df85..b3b76590a4 100644 --- a/pw_bluetooth_sapphire/fuchsia/BUILD.bazel +++ b/pw_bluetooth_sapphire/fuchsia/BUILD.bazel @@ -28,6 +28,7 @@ license( qemu_tests = [ "//pw_bluetooth_sapphire/fuchsia/bt_host:unittest_pkg", + "//pw_bluetooth_sapphire/fuchsia/host/common:test_pkg", ] fuchsia_test_group( diff --git a/pw_bluetooth_sapphire/fuchsia/backends.bazelrc b/pw_bluetooth_sapphire/fuchsia/backends.bazelrc index fcec646638..e09d024e35 100644 --- a/pw_bluetooth_sapphire/fuchsia/backends.bazelrc +++ b/pw_bluetooth_sapphire/fuchsia/backends.bazelrc @@ -15,11 +15,7 @@ common:fuchsia --@pigweed//pw_assert:backend=@pigweed//pw_assert_fuchsia common:fuchsia --@pigweed//pw_assert:check_backend=@pigweed//pw_assert_fuchsia common:fuchsia --@pigweed//pw_assert:check_backend_impl=@pigweed//pw_build:empty_cc_library - -# TODO: https://pwbug.dev/360411906 - Port these remaining fuchsia backend -# configurations from fuchsia.git into @pigweed. -# common:fuchsia --@pigweed//pw_log:backend=@pigweed//pw_log_fuchsia -# common:fuchsia --@pigweed//pw_function:config_override=//third_party/pigweed/backends/pw_function:config -# common:fuchsia --@pigweed//pw_unit_test:backend=@pigweed//pw_unit_test:googletest -# common:fuchsia --@pigweed//pw_async:task_backend=//third_party/pigweed/backends/pw_async_fuchsia:task -# common:fuchsia --@pigweed//pw_async:fake_dispatcher_backend=//third_party/pigweed/backends/pw_async_fuchsia:fake_dispatcher +common:fuchsia --@pigweed//pw_log:backend=@pigweed//pw_log_fuchsia +common:fuchsia --@pigweed//pw_unit_test:backend=@pigweed//pw_unit_test:googletest +common:fuchsia --@pigweed//pw_async:task_backend=@pigweed//pw_async_fuchsia:task +common:fuchsia --@pigweed//pw_async:fake_dispatcher_backend=@pigweed//pw_async_fuchsia:fake_dispatcher diff --git a/pw_bluetooth_sapphire/fuchsia/inspect_testing/BUILD.bazel b/pw_bluetooth_sapphire/fuchsia/inspect_testing/BUILD.bazel index 448b21d433..f61873d896 100644 --- a/pw_bluetooth_sapphire/fuchsia/inspect_testing/BUILD.bazel +++ b/pw_bluetooth_sapphire/fuchsia/inspect_testing/BUILD.bazel @@ -19,7 +19,9 @@ cc_library( srcs = ["inspect.cc"], hdrs = ["public/lib/inspect/testing/cpp/inspect.h"], includes = ["public"], - deps = select({ + deps = [ + "//pw_bluetooth_sapphire:config", + ] + select({ "@platforms//os:fuchsia": [ "@com_google_googletest//:gtest", "@fuchsia_sdk//pkg/inspect", diff --git a/pw_bluetooth_sapphire/host/common/BUILD.bazel b/pw_bluetooth_sapphire/host/common/BUILD.bazel index 565b7ac2d6..2fbe7a7e4f 100644 --- a/pw_bluetooth_sapphire/host/common/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/common/BUILD.bazel @@ -112,4 +112,5 @@ cc_library( "//pw_bluetooth_sapphire/host/testing:gtest_main", "@pigweed//pw_async:fake_dispatcher_fixture", ], + alwayslink = 1, ) diff --git a/pw_bluetooth_sapphire/host/testing/BUILD.bazel b/pw_bluetooth_sapphire/host/testing/BUILD.bazel index 8d92220c21..aeba21eddb 100644 --- a/pw_bluetooth_sapphire/host/testing/BUILD.bazel +++ b/pw_bluetooth_sapphire/host/testing/BUILD.bazel @@ -27,7 +27,11 @@ cc_library( copts = [ "-Wno-unused-parameter", ], - target_compatible_with = ["//pw_unit_test:googletest_only"], + target_compatible_with = select({ + "//pw_unit_test:googletest_only": [], + "@platforms//os:fuchsia": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ ":fake_controller", ":mock_controller", @@ -47,7 +51,11 @@ cc_library( copts = [ "-Wno-unused-parameter", ], - target_compatible_with = ["//pw_unit_test:googletest_only"], + target_compatible_with = select({ + "//pw_unit_test:googletest_only": [], + "@platforms//os:fuchsia": [], + "//conditions:default": ["@platforms//:incompatible"], + }), # test_helpers.h is currently in bt-host:public, but its deps are here. deps = [ "//pw_bluetooth_sapphire:public", @@ -64,7 +72,11 @@ cc_library( copts = [ "-Wno-unused-parameter", ], - target_compatible_with = ["//pw_unit_test:googletest_only"], + target_compatible_with = select({ + "//pw_unit_test:googletest_only": [], + "@platforms//os:fuchsia": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//pw_bluetooth_sapphire:public", "//pw_bluetooth_sapphire/host/common", @@ -83,7 +95,11 @@ cc_library( copts = [ "-Wno-unused-parameter", ], - target_compatible_with = ["//pw_unit_test:googletest_only"], + target_compatible_with = select({ + "//pw_unit_test:googletest_only": [], + "@platforms//os:fuchsia": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ ":controller_test_double_base", ":test_helpers", @@ -110,7 +126,11 @@ cc_library( copts = [ "-Wno-unused-parameter", ], - target_compatible_with = ["//pw_unit_test:googletest_only"], + target_compatible_with = select({ + "//pw_unit_test:googletest_only": [], + "@platforms//os:fuchsia": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ ":controller_test_double_base", ":test_helpers", @@ -142,7 +162,11 @@ cc_library( cc_library( name = "loop_fixture", testonly = True, - target_compatible_with = ["//pw_unit_test:googletest_only"], + target_compatible_with = select({ + "//pw_unit_test:googletest_only": [], + "@platforms//os:fuchsia": [], + "//conditions:default": ["@platforms//:incompatible"], + }), # header is in bt-host:public deps = [ "//pw_bluetooth_sapphire:public", @@ -152,7 +176,7 @@ cc_library( ) cc_library( - name = "_test.lib", + name = "testing_test.lib", testonly = True, srcs = [ "fake_controller_test.cc", diff --git a/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/common/inspect.h b/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/common/inspect.h index 092574b801..c01adb0786 100644 --- a/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/common/inspect.h +++ b/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/common/inspect.h @@ -22,6 +22,8 @@ #include "pw_preprocessor/compiler.h" PW_MODIFY_DIAGNOSTICS_PUSH(); PW_MODIFY_DIAGNOSTIC(ignored, "-Wswitch-enum"); +#include #include +#include PW_MODIFY_DIAGNOSTICS_POP(); #endif // NINSPECT diff --git a/pw_function/BUILD.bazel b/pw_function/BUILD.bazel index a867ca79ea..aa7b59368d 100644 --- a/pw_function/BUILD.bazel +++ b/pw_function/BUILD.bazel @@ -95,6 +95,7 @@ alias( ( "@platforms//os:android", "@platforms//os:chromiumos", + "@platforms//os:fuchsia", "@platforms//os:linux", "@platforms//os:macos", "@platforms//os:windows",