ut: cmocka test cleanup#10965
Open
tmleman wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Removes legacy cmocka math/arithmetic unit tests that have already been ported to Zephyr ztest, reducing duplication in the test suite while keeping coverage via the newer ztest equivalents.
Changes:
- Deleted cmocka-based arithmetic math tests for sqrt, power, exp, and logarithms.
- Updated the cmocka arithmetic
CMakeLists.txtto drop the removed test targets (leavinga_law_codecandmu_law_codec).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/cmocka/src/math/arithmetic/square_root.c | Removed legacy cmocka sqrt test (ported to ztest). |
| test/cmocka/src/math/arithmetic/scalar_power.c | Removed legacy cmocka power test (ported to ztest). |
| test/cmocka/src/math/arithmetic/exponential.c | Removed legacy cmocka exp/db2lin tests (ported to ztest). |
| test/cmocka/src/math/arithmetic/base2_logarithm.c | Removed legacy cmocka log2 test (ported to ztest). |
| test/cmocka/src/math/arithmetic/base_10_logarithm.c | Removed legacy cmocka log10 test (ported to ztest). |
| test/cmocka/src/math/arithmetic/base_e_logarithm.c | Removed legacy cmocka ln test (ported to ztest). |
| test/cmocka/src/math/arithmetic/CMakeLists.txt | Removed cmocka targets for the deleted tests. |
This patch removes the scalar power test that has been successfully converted from cmocka to ztest. The ztest equivalent is in test/ztest/unit/math/advanced/functions/ test_scalar_power_ztest.c and was merged in PR thesofproject#10364. Ztest coverage for power.c: - lines: 92.9% (13/14) - funcs: 100% (1/1) Code coverage testing did not reveal any regression. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch removes the base-2 logarithm test that has been successfully converted from cmocka to ztest. The ztest equivalent is in test/ztest/unit/math/advanced/functions/ test_base2_logarithm_ztest.c and was merged in PR thesofproject#10590. Ztest coverage for base2log.c: - lines: 100% (21/21) - funcs: 100% (1/1) Note: base2log.c remains covered by the cmocka auditory test as well, which uses it as a dependency. Code coverage testing did not reveal any regression. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch removes the exponential test that has been successfully converted from cmocka to ztest. The ztest equivalent is in test/ztest/unit/math/advanced/functions/ test_exponential_ztest.c and was merged in PR thesofproject#10590. Ztest coverage for exp_fcn.c: - lines: 100% (59/59) - funcs: 100% (3/3) The ztest version tests sofm_exp_approx(), sofm_exp_fixed(), and sofm_db2lin_fixed() with full line coverage. Code coverage testing did not reveal any regression. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch removes the square root test that has been successfully converted from cmocka to ztest. The ztest equivalent is in test/ztest/unit/math/advanced/functions/ test_square_root_ztest.c and was merged in PR thesofproject#10764. Ztest coverage for sqrt_int16.c: - lines: 100% (27/27) - funcs: 100% (1/1) Code coverage testing did not reveal any regression. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch removes the base-10 logarithm test that has been successfully converted from cmocka to ztest. The ztest equivalent is in test/ztest/unit/math/advanced/functions/ test_base10_logarithm_ztest.c and was merged in PR thesofproject#10764. Ztest coverage for log_10.c: - lines: 100% (2/2) - funcs: 100% (1/1) Code coverage testing did not reveal any regression. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch removes the base-e logarithm test that has been successfully converted from cmocka to ztest. The ztest equivalent is in test/ztest/unit/math/advanced/functions/ test_base_e_logarithm_ztest.c and was merged in PR thesofproject#10764. Ztest coverage for log_e.c: - lines: 100% (2/2) - funcs: 100% (1/1) Code coverage testing did not reveal any regression. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
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.
Removing legacy tests that have already been ported to ztest.