The names of the utest cases defined in their respective
modules have been updated.
Some utest case names are not yet in their respective modules
because their paths need to be finalized before their unique
names can be determined. Currently, these names do not
appear to conflict with the unified names. These include:
- utest cases still in examples
- bsp/qemu-virt64-riscv/applications/test/test_vector/test_vector.c.
The entire test case should probably be placed in libcpu/risc-v
rather than bsp.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
More details see PR #10681.
As utest cases are currently moving out of `examples/utest/testcases`
into their own module directories, the naming rule needs to change
accordingly.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
The introduction to Env under the documentation
section of the RTT source code repository is
outdated and unmaintained. We recommend moving the Env
documentation to https://github.com/RT-Thread/env/
for self-maintenance.
Solution:
Direct users to the latest README at https://github.com/RT-Thread/env/.
The Env content under the documentation section of RTT
will not be deleted for now, but will be marked as "outdated".
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Similar to PR #10674, `src/scheduler_mp.c` and
`src/scheduler_up.c` also have similar issues.
After investigation, we found: in commit 2c98ce4605
"[HUST CSE][document] Fix some comments, invalid
grouping commands and warnings in Doxygen." This patch
excluded `src/scheduler_mp.c` and `src/scheduler_up.c`
from the Doxygen build and include
`documentation/doxygen/thread.h` (the new file path
after adjustment is `documentation/0.doxygen/core/thread.h`),
placing the Doxygen comments for some functions in this file.
However, this approach has its problems:
- The comments in `documentation/0.doxygen/core/thread.h`
are separated from the source code, making them
difficult to maintain. This also results in the
comments for the newly added functions in
`src/scheduler_mp.c` and `src/scheduler_up.c` not
being updated in a timely manner and failing to
be compiled into Doxygen (becoming HTML).
- For the average programmer, it's unlikely that
they'll consider the `documentation/0.doxygen/`
directory for function declarations and comments,
let alone the need to maintain the Doxygen comments
in that directory. Currently, the header files under
`documentation/0.doxygen/` should strictly be used
only to define Doxygen groups and should not include
Doxygen comments for the code itself. (Similar
issues exist in documentation/0.doxygen/3.hardware.h
and documentation/0.doxygen/core/systeminit.h, which
require further cleanup.)
The solution is similar to PR #10674, where only MP
documentation is generated by default. For functions
defined in MP but not in UP, we use the "@note"
directive in the function's doxygen comment to indicate
whether the function is supported in both UP and MP,
or only in MP.
After implementing this solution, the file
`documentation/0.doxygen/core/thread.h` can be deleted.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Refer to the issue described in PR #10599. This was a
temporary fix at that time.
After further research, we discovered that this issue
can be addressed using the "@cond" command supported
by Doxygen.
Since we currently do not intend to generate two sets
of documentation for UP and MP when generating Doxygen
documentation, the current solution is to generate only
MP documentation by default. For functions defined in
MP but not in UP, we will use the "@note" command in
the function's Doxygen comment to indicate whether the
function supports both UP and MP, or only MP.
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>
The code formatting in the Object Management Markdown document
is misaligned. This issue can be fixed by replacing tabs with spaces.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Added pdma support for uart driver and a test file test_uart.c.
The test uses pdma to improve uart send speed,
to check if the driver works correctly.
Signed-off-by: XU HU 1337858472@qq.com
After "utest: re-org utest framework (initial version)" (PR #10534)
was merged, adding a document to introduce how to add utest-cases
for your module.
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>
Append a null statement for "Any statement may be preceded by a prefix that declares an identifier as a label name."
Signed-off-by: GuEe-GUI <2991707448@qq.com>