Skip to content

Commit

Permalink
pw_bluetooth_sapphire: Document how tests are run
Browse files Browse the repository at this point in the history
Change-Id: Id4969f526c4e5ce09be75e5ffc9c358691d4cd31
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/234313
Lint: Lint 🤖 <[email protected]>
Reviewed-by: Kayce Basques <[email protected]>
Commit-Queue: Ben Lawson <[email protected]>
  • Loading branch information
BenjaminLawson authored and CQ Bot Account committed Sep 6, 2024
1 parent 13eef66 commit 54c90e5
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions pw_bluetooth_sapphire/docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,53 @@ Why use Sapphire?
all conformance tests.
* **A great API**. Coming 2024. See :ref:`module-pw_bluetooth`.

------------
Contributing
------------

Running tests
=============
.. tab-set::

.. tab-item:: Bazel (host)

Run all tests:

.. code-block:: console
bazel test //pw_bluetooth_sapphire/host/... \
--platforms=//pw_unit_test:googletest_platform \
--@pigweed//pw_unit_test:backend=@pigweed//pw_unit_test:googletest
Run l2cap tests with a test filter, logs, and log level filter:

.. code-block:: console
bazel test //pw_bluetooth_sapphire/host/l2cap:l2cap_test \
--platforms=//pw_unit_test:googletest_platform \
--@pigweed//pw_unit_test:backend=@pigweed//pw_unit_test:googletest \
--test_arg=--gtest_filter="*InboundChannelFailure" \
--test_output=all \
--copt=-DPW_LOG_LEVEL_DEFAULT=PW_LOG_LEVEL_ERROR
.. tab-item:: Bazel (Fuchsia emulator)

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

The easiest way to run GN tests is with ``pw presubmit``, which will install
dependencies and set GN args correctly.

.. code-block:: console
$ pw presubmit --step gn_chre_googletest_nanopb_sapphire_build
You can also use ``pw watch`` if you install all the packages and set
your GN args to match the `GN presubmit step`_.

---------------
Fuchsia support
---------------
Expand Down Expand Up @@ -185,3 +232,4 @@ Roadmap

.. _bt-host component: https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/connectivity/bluetooth/core/bt-host/
.. _fuchsia/prebuilt/bt-host: https://chrome-infra-packages.appspot.com/p/fuchsia/prebuilt/bt-host
.. _GN presubmit step: https://cs.opensource.google/pigweed/pigweed/+/main:pw_presubmit/py/pw_presubmit/pigweed_presubmit.py?q=gn_chre_googletest_nanopb_sapphire_build

0 comments on commit 54c90e5

Please sign in to comment.