-
Notifications
You must be signed in to change notification settings - Fork 1.5k
boards/sim/crypto: enable cmocka testing framework #18251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
boards/sim/crypto: enable cmocka testing framework #18251
Conversation
|
@ThePassionate you need to normalize all SIM profiles to avoid errors like this: You can use this command: |
f526626
42046a6 to
29b133e
Compare
@acassis Thanks, but i found change in almost every defconfig. Shell i commit all result of the nomalization?
or just need to fix sim:crypto configure. |
don't change the unrelated file |
I got it! Let me try. |
Enable CMocka unit testing framework in the simulator crypto configuration. This requires enabling the following dependencies: - CONFIG_ALLOW_MIT_COMPONENTS: Allow MIT licensed components - CONFIG_LIBC_REGEX: Regular expression support needed by CMocka - CONFIG_TESTING_CMOCKA: CMocka unit testing framework - CONFIG_TESTING_CRYPTO: Crypto testing support Signed-off-by: makejian <makejian@xiaomi.com>
29b133e to
186e2b9
Compare


NuttX Simulator: Enable CMocka Testing Framework for Crypto Configuration
Overview
Enable CMocka unit testing framework support in the simulator's crypto configuration by adding required libc dependencies. This allows crypto test cases from nuttx-apps that depend on the CMocka framework to properly build and execute on the NuttX simulator.
Changes
Modified
boards/sim/sim/sim/configs/crypto/defconfigto enable:CONFIG_ALLOW_MIT_COMPONENTS=y- Allow MIT licensed componentsCONFIG_LIBC_REGEX=y- Enable regex library (CMocka dependency)CONFIG_TESTING_CMOCKA=y- Enable CMocka unit testing frameworkRationale
The nuttx-apps crypto testing module has been modernized to use CMocka unit testing framework instead of CLI-based tests. To support this on the NuttX simulator, the required dependencies must be available in the crypto configuration.
Dependency Chain
CONFIG_TESTING_CRYPTO (nuttx-apps)
↓ depends on
CONFIG_TESTING_CMOCKA (nuttx-apps)
↓ depends on
CONFIG_LIBC_REGEX (nuttx)
↓ depends on
CONFIG_ALLOW_MIT_COMPONENTS (nuttx)
Testing
This configuration change enables proper CI builds and execution of crypto tests that utilize the CMocka framework on the NuttX simulator without stripping the required testing configuration.
Related
- NuttX-Apps PR: apps-features branch (cmocka-based crypto testing)