ci: run all tests with twister

Run the application unit tests and the driver tests with a single
twister call and update the documentation accordingly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Martin Jäger
2026-10-21 13:47:01 +02:00
co-authored by Claude Opus 5.5
parent a1fff4ee6f
commit 2a7473db80
3 changed files with 19 additions and 9 deletions
+1 -5
View File
@@ -45,8 +45,4 @@ jobs:
- name: Run tests
run: |
west build -b native_sim -t run tests/app -p
- name: Run driver tests
run: |
west twister -T tests/drivers --integration --inline-logs
west twister -T tests --integration --inline-logs
+17 -4
View File
@@ -1,13 +1,26 @@
Unit Tests
==========
Core functions of the firmware are covered by unit-tests (located in ``tests`` directory). Build
and run the tests with the following command:
Core functions of the firmware are covered by unit tests based on the Zephyr ztest framework. The
tests are located in the ``tests`` directory:
- ``tests/app``: Unit tests of the application (charger, DC/DC control, load output, etc.)
- ``tests/drivers``: Tests of the drivers in this repository
All tests are run on ``native_sim`` with emulated drivers using twister:
.. code-block:: bash
cd tests
west build -p -b native_posix -t run
west twister -T tests --integration
The driver tests are additionally built (but not run) for some of the boards to ensure that the
drivers compile for all supported MCUs.
The firmware can be built for all boards and board revisions in the same way:
.. code-block:: bash
west twister -T app --integration
Conformance testing
+1
View File
@@ -25,6 +25,7 @@ Afterwards, most important folders in your workspace will look like this:
├── charge-controller-firmware/ # application firmware repository
│ ├── app/ # application source files
│ ├── boards/ # board specifications
│ ├── drivers/ # driver source files
│ ├── tests/ # unit test source files
│ └── west.yml # main manifest file
│