Skip to content

Conversation

@unicornx
Copy link
Contributor

@unicornx unicornx commented Sep 2, 2025

随着 #10534 的合入,我们开始逐渐将各个子模块的单元测试用例都移动到自己的模块所在目录下。
本 pr 首先先将 utest framework 自身的 testcases 移到 utest 所在目录 components/utilities/utest 下。

为方便 review,本 PR 包含两个 commit

  • “utest: move testcases of Utest from example to Utest folder”:将 utest framework 自身的 testcases 从 example 下移到 utest 所在目录 components/utilities/utest 下管理。需要注意的是:原先 components/utilities/utest 下本身就有单元测试用例,而且比 examples/utest/testcases/utest/ 下的测试用例更全面,所以直接删掉了 examples 下的测试用例,用 utest 框架下原有的测试用例就好了。
  • “utest/utest: rename name and add license text”:对原有测试用例代码做了些小改进,加上了 license 信息,以及将 utestcases 的 name 改成 utest。

本 PR 基于 bsp/qemu-virt64-riscv 测试通过。

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 <[email protected]>
@github-actions
Copy link

github-actions bot commented Sep 2, 2025

📌 Code Review Assignment

🏷️ Tag: components

Reviewers: @Maihuanyi

Changed Files (Click to expand)
  • components/utilities/utest/SConscript
  • components/utilities/utest/utest/Kconfig
  • components/utilities/utest/utest/SConscript
  • components/utilities/utest/utest/TC_uassert.c

📊 Current Review Status (Last Updated: 2025-09-02 11:49 CST)


📝 Review Instructions

  1. 维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态
    Maintainers can refresh the review status by clicking here: 🔄 Refresh Status

  2. 确认审核通过后评论 LGTM/lgtm
    Comment LGTM/lgtm after confirming approval

  3. PR合并前需至少一位维护者确认
    PR must be confirmed by at least one maintainer before merging

ℹ️ 刷新CI状态操作需要具备仓库写入权限。
ℹ️ Refresh CI status operation requires repository Write permission.

@unicornx unicornx requested a review from kurisaW September 2, 2025 03:50
@kurisaW
Copy link
Member

kurisaW commented Sep 2, 2025

LGTM

@kurisaW kurisaW merged commit c0142c7 into RT-Thread:master Sep 2, 2025
62 checks passed
@unicornx unicornx deleted the dev-utest-utest branch September 8, 2025 05:35
tomjielii pushed a commit to tomjielii/rt-thread that referenced this pull request Sep 9, 2025
* 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 <[email protected]>

* utest/utest: rename name and add license text

Signed-off-by: Chen Wang <[email protected]>

---------

Signed-off-by: Chen Wang <[email protected]>
tomjielii pushed a commit to tomjielii/rt-thread that referenced this pull request Sep 12, 2025
* 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 <[email protected]>

* utest/utest: rename name and add license text

Signed-off-by: Chen Wang <[email protected]>

---------

Signed-off-by: Chen Wang <[email protected]>
@Rbb666 Rbb666 added this to the v5.2.2 milestone Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants