zephyr/tests/bsim/bluetooth/host/misc/sample_test
Artur Dobrynin e0f74cf1b0 tests: bsim: bluetooth: host: use twister to compile tests
Bluetooth host bsim tests are compiled with shell scripts, but it is
possible to use twister, which supports compilation (but not running
at the moment). Compiling with twister requires fewer shell scripts,
provides cleaner interface and more flexible configuration.

Signed-off-by: Artur Dobrynin <artur.dobrynin@nordicsemi.no>
2024-12-07 02:03:31 +01:00
..
src
test_scripts
CMakeLists.txt
prj.conf
README.rst
testcase.yaml tests: bsim: bluetooth: host: use twister to compile tests 2024-12-07 02:03:31 +01:00

.. _bluetooth_bsim_test_sample:

Bluetooth: Example BabbleSim test
#################################

Abstract
********

This test's purpose is to serve as template for implementing a new BabbleSim Bluetooth test.

BabbleSim_ is :ref:`integrated in zephyr <bsim>` and used for testing the Bluetooth stack.
The tests are implemented in ``tests/bsim/bluetooth``.
They can only be run on Linux.

This sample test uses the ``testlib`` (:zephyr_file:`tests/bluetooth/common/testlib/CMakeLists.txt`)
test library, in order to de-duplicate code that is not relevant to the test in question. Things
like setting up a connection, getting the GATT handle of a characteristic, etc..

Please don't use the ``bs_`` prefix in files or identifiers. It's meant to
namespace the babblesim simulator code.

Reading guide
*************

Read in order:

1. The :ref:`Bsim test documentation <bsim>`.
#. ``test_scripts/run.sh``
#. ``CMakeLists.txt``
#. ``src/dut.c`` and ``src/peer.c``
#. ``src/main.c``

.. _BabbleSim:
   https://BabbleSim.github.io