Use "Test" instead of "Unit Testcases" to make string shorter.
Use uppercase to make it look more eye-catching.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
The original project display was completely flat,
now it is organized into a tree-like hierarchical
structure based on the layout of the code.
mm & tmpfs test are still keep as pervious bcos we
have not move the source for these two components.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Also:
- Add "RT_" prefix for utest config options.
- Rename the case names to following the naming rule.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Also:
- Add "RT_" prefix for the UTEST config options.
- Follow the naming rules to update the case name.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Also,
- Rename UTEST_SMP_CALL_FUNC to RT_UTEST_SMP_CALL_FUNC.
- Add depends on RT_USING_SMP in Kconfig for RT_UTEST_SMP_CALL_FUNC
- Follow the naming rules of utest case to update the cases' name.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
src/utest/device_tc.c is testing API: rt_device_find(),
which is a function defined in components/drivers/core/device.c.
So it should be a testcase for drivers core, not for core.
Move it to under components/drivers/core.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
* utest: move testcases of Utest from example to Utest folder
Create unit-test-cases for the Utest framework subsystem
according to "How to add utest cases into RT-Thread for your module." [1]
Link:
https://rt-thread.github.io/rt-thread/page_component_utest.html#autotoc_md804
[1]
The original `components/utilities/utest` directory already has unit
testcases, which are more comprehensive than the testcases in
`examples/utest/testcases/utest/`. Therefore, simply deleted
the test cases in `examples` and used the existing testcases
in the utest framework.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
* utest/utest: rename name and add license text
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
---------
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Change the entry of utest's Kconfig from
'examples/utest/testcases/Kconfig' to
'Kconfig.utestcases'.
Modified the build scripts where the path name
is "examples/utest/testcases/Kconfig" and changed
it to 'Kconfig.utestcases', otherwise build
operations such 'scons --dist' may fail.
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 Kconfig.utestcases 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 there 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.
After completing the above steps, add the path of the
Kconfig file of utest of this module to the
Kconfig.utestcases file.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>