You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change the entry of utest's Kconfig from
examples/utest/testcases/Kconfig to
components/utilities/utest/Kconfig.
In the future, the testcase source code of
utest will be placed in each module for
maintenance, but the entry of Kconfig will all
be placed in components/utilities/utest/Kconfig
for unified maintenance. In this way, when
executing menuconfig, people can enter and
configure from one place, avoiding searching
for utest configuration switches here and
ther in the menuconfig interface.
For each module, you can maintain unit-test
in a unified manner in the following way:
- Create a subdirectory named 'utest' in the
directory where your module is located.
- Store the following files in the utest subdirectory:
- Unit test case program source code files for this
module.
- Kconfig file, add configuration options for the
unit test files of this module, the recommended
option is named RT_UTEST_TC_USING_XXXX, XXXX is the
global unique module name of this module.
- SConscript file, note that when adding src files,
in addition to relying on RT_UTEST_TC_USING_XXXX,
you must also rely on RT_UTEST_USING_ALL_CASES, the
two dependencies are in an "or" relationship. The
role of RT_UTEST_USING_ALL_CASES is that once this
option is turned on, all unit tests will be enabled
to avoid selecting one by one.
Signed-off-by: Chen Wang <[email protected]>
0 commit comments