{{ message }}
test: convert LIST unit tests from CMock to Ztest framework#10066
Merged
lgirdwood merged 2 commits intoJul 16, 2025
Merged
Conversation
Contributor
Author
lyakh
reviewed
Jun 24, 2025
2 tasks
b8300ff to
9f07951
Compare
9f07951 to
2c36807
Compare
This commit converts the legacy LIST unit tests from the CMocka/Unity test framework to the Zephyr Ztest framework. The converted tests maintain the same test coverage while adhering to SOF and Zephyr coding standards. The test code was generated with assistance from GitHub Copilot AI. Test flow and test coverage scope is based on the existing CMocka tests located at sof/test/cmocka/src/list. All list operations are covered: - list_init - list_is_empty - list_item_append - list_item_prepend - list_item_del - list_item_is_last Tests can be run with: west twister --testsuite-root sof/test/ztest/unit/ --platform \ native_sim --verbose --inline-logs Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This commit introduces a functional CI workflow that builds and executes SOF unit tests that have been ported from cmocka to Zephyr ztest. Key features: - Targets native_sim platform for unit test execution - Installs minimal dependencies: clang, llvm, ninja-build, device-tree-compiler - Includes multilib support (gcc-multilib/g++-multilib) for i386 native_sim - Runs tests using west twister with verbose output and inline logs - 10-minute timeout for efficient CI resource usage - Proper concurrency control to cancel previous runs The workflow has been tested and verified to work in CI environment. It provides a foundation for continuous integration of SOF unit tests without requiring the full Zephyr SDK installation, making it faster and more resource-efficient. Future iterations can extend this workflow to include additional test suites and platforms as they are developed. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
lyakh
approved these changes
Jul 14, 2025
lgirdwood
approved these changes
Jul 14, 2025
Member
|
@wszypelt good to merge ? not expecting this code to run in internal CI. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This commit converts the legacy LIST unit tests from the CMock test framework to the Zephyr Ztest framework. The converted tests maintain the same test coverage while adhering to SOF and Zephyr coding standards.
All list operations are covered:
Tests can be run with:
west twister --testsuite-root sof/test/ztest/unit/list/ --platform native_sim