Skip to content

Commit dcc8b7c

Browse files
committed
unit_tests: Add ztest documentation structure and mark CMocka as legacy
Prepare documentation for the ongoing migration from CMocka to Zephyr's native ztest framework for SOF unit tests. Changes: - Create new unit_tests_ztest.rst placeholder for upcoming ztest documentation - Add deprecation notice to unit_tests.rst indicating CMocka is legacy - Add informational note to xtrun/index.rst about the testing framework transition - Update developer_guides/index.rst to include new ztest documentation entry The CMocka-based tests are being phased out as part of the migration to ztest. This commit adds notices to inform developers that new tests should use ztest, while existing CMocka documentation remains available during the transition period. The new ztest documentation page is positioned before the legacy CMocka documentation in the index for better discoverability. Related: thesofproject/sof#10110 Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
1 parent 32b3fca commit dcc8b7c

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

developer_guides/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ terminology before reading further.
1111

1212
introduction
1313
firmware/index
14+
unit_tests_ztest
1415
unit_tests
1516
xtrun/index
1617
topology/topology

developer_guides/unit_tests.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
.. _unit_tests:
22

3-
Unit Tests
4-
##########
3+
Unit Tests (Legacy CMocka)
4+
###########################
5+
6+
.. warning::
7+
**DEPRECATED: This documentation describes the legacy CMocka-based unit testing framework.**
8+
9+
SOF is migrating to Zephyr's native ztest framework. The CMocka tests are being phased out
10+
and will be removed once the migration is complete.
11+
12+
**For new unit tests, please use the ztest framework.** See :doc:`unit_tests_ztest` for
13+
the current testing approach.
514

615
Prerequisites
716
*************
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. _unit_tests_ztest:
2+
3+
Unit Tests with Ztest
4+
######################
5+

developer_guides/xtrun/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ intrinsics (such as HiFi3) in your C programs.
5555
Unit tests
5656
**********
5757

58+
.. note::
59+
**This section describes legacy CMocka-based unit tests.** SOF is migrating to Zephyr's
60+
ztest framework. For current unit testing practices, see :doc:`../unit_tests_ztest`.
61+
5862
In the SOF project, ``xt-run`` is used as the executor for unit tests.
5963

6064
The below example shows how you can add a simple unit test case for a sample

0 commit comments

Comments
 (0)