Skip to content

Commit

Permalink
pw_bluetooth_sapphire: Document how to run Bazel Fuchsia tests
Browse files Browse the repository at this point in the history
Change-Id: I1978b97d8564f67807af7455a9fb1d038eaaf6fe
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/237992
Reviewed-by: Ali Saeed <[email protected]>
Lint: Lint 🤖 <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
Presubmit-Verified: CQ Bot Account <[email protected]>
Pigweed-Auto-Submit: Ben Lawson <[email protected]>
  • Loading branch information
BenjaminLawson authored and CQ Bot Account committed Sep 26, 2024
1 parent 07636c2 commit 5c21dc8
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions pw_bluetooth_sapphire/docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,29 @@ Running tests
--test_output=all \
--copt=-DPW_LOG_LEVEL_DEFAULT=PW_LOG_LEVEL_ERROR
.. tab-item:: Bazel (Fuchsia emulator)
.. tab-item:: Bazel (Fuchsia)

First, ensure the emulator is running or hardware running Fuchsia is
connected. Then run a test package with:

.. code-block:: console
bazel run --config=fuchsia //pw_bluetooth_sapphire/fuchsia/host/l2cap:test_pkg
.. note::
If the test is unable to connect to the emulator, run ``pw ffx target
remove --all`` first to clean your machine's target list.

.. note::
Passing flags like `--gtest_filter` is not yet supported. See
`fxbug.dev/369662168 <https://fxbug.dev/369662168>`_.

You can also run the presubmit step that will start an emulator and run
all tests, but this is slow:

.. code-block:: console
bazel run --config=fuchsia //pw_bluetooth_sapphire/fuchsia:infra.test_all
pw presubmit --step bthost_package
.. tab-item:: GN (host)

Expand Down

0 comments on commit 5c21dc8

Please sign in to comment.