Some tests have a compile script for that test alone, named `_compile.sh` or `_build.sh`. These scripts are useful for developers to avoid compiling the world. But these scripts were not run in the CI. These scripts were previously not suitable for running in the CI because would put the artefact in the source directory, but this is no longer the case, and the CI could run these scripts now. This commit renames any `<test>/test_scripts/_compile.sh` and `<test>/test_scripts/_build.sh` to `<test>/compile.sh`. The test runner in CI will ignores any file named `compile.sh`, so there is no need for a underscore prefix. This fits into and extends the hierarchical structure of `compile.sh` chain that starts at `:/test/bsim/compile.sh`, the CI build script tree. The newly moved scripts now become a part of the build script tree, called from a `compile.sh` where a duplicate set of build commands was before. The sub scripts use `run_in_background` to preserve the parallelism as it was before this change. This removes an error-prone duplication and makes the CI test all the build scripts. Tests that did not have any compile script are not given one for now. Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no> |
||
|---|---|---|
| .. | ||
| src | ||
| test_scripts | ||
| CMakeLists.txt | ||
| compile.sh | ||
| prj.conf | ||
| README.rst | ||
.. _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