Skip to content

Conversation

@unicornx
Copy link
Contributor

统一 utest case 相关的 configure options 的名字。主要修改点:

  • 统一加上 ”RT_" 前缀,和其他的 Kconfig 中 RTT 的 configure options 的名字保持一致。
  • 去掉末尾的 “_TC" 后缀,没有太大的意义,有些有有些没有,干脆统一全部不加,也缩短名字长度。
  • 更改 doxygen 文档中对 utest 的 confguration options 名字的规范要求。

修改的文件除了 Kconfig 文件和 SConscript 文件外,还包括一些 *.cfg 文件和 .config/rtconfig.h 文件。

特别地,对于 bsp 的 .config/rtconfig.h 文件, 修改采用以下原则:

  • 如果是涉及 “# CONFIG_XXX is not set” 则无需修改;它们是注释。此外,对于 BSP,运行 “scons --menuconfig” 并保存配置将自动替换它们。因此,对这种情况下无需修改。
  • 如果是涉及 ”CONFIG_XXX =y" 的则需要修改,否则即使运行 “scons --menuconfig” 也无法自动纠正,需要手动修改。

本 PR 修改的地方比较多,为了方便 review,分为多个 commit,每个 commit 修改一个对应的配置项名称。merge 时请尽量保持不要压缩。

注:有少数几个 utest 相关的配置项名字没有改,他们是:UTEST_THR_STACK_SIZEUTEST_THR_PRIORITY 。因为这些宏在 bsp 的配置中存在的地方太多了,而且本质上它们并不是测试case 项相关的宏,所以就不改了。(实际上我很奇怪为何这些 bsp 会 enable RT_USING_UTEST, 原则上一个默认的 bsp 的配置应该关掉 RT_USING_UTEST 才对。)

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
…CORE

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Configuration options naming rule for utest is changed
from "RT_UTEST_TC_USING_XXXX" to "RT_UTEST_XXXX".

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
@github-actions
Copy link

👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread!

为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。
To ensure your code complies with RT-Thread's coding style, please run the code formatting workflow by following the steps below (If the formatting of CI fails to run).


🛠 操作步骤 | Steps

  1. 前往 Actions 页面 | Go to the Actions page
    点击进入工作流 → | Click to open workflow →

  2. 点击 Run workflow | Click Run workflow

  • 设置需排除的文件/目录(目录请以"/"结尾)
    Set files/directories to exclude (directories should end with "/")
  • 将目标分支设置为 \ Set the target branch to:dev-utest-unify-configname
  • 设置PR number为 \ Set the PR number to:10808
  1. 等待工作流完成 | Wait for the workflow to complete
    格式化后的代码将自动推送至你的分支。
    The formatted code will be automatically pushed to your branch.

完成后,提交将自动更新至 dev-utest-unify-configname 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the dev-utest-unify-configname branch automatically, and the related Pull Request will be updated.

如有问题欢迎联系我们,再次感谢您的贡献!💐
If you have any questions, feel free to reach out. Thanks again for your contribution!

@github-actions
Copy link

📌 Code Review Assignment

🏷️ Tag: components

Reviewers: @Maihuanyi

Changed Files (Click to expand)
  • components/drivers/serial/utest/Kconfig
  • components/drivers/serial/utest/bypass/SConscript
  • components/drivers/serial/utest/v2/SConscript
  • components/drivers/serial/utest/v2/posix/uart_posix_echo_block.c
  • components/drivers/serial/utest/v2/posix/uart_posix_nonblock.c
  • components/drivers/serial/utest/v2/qemu/uart_qemu_echo.c
  • components/drivers/serial/utest/v2/uart_blocking_rx.c
  • components/drivers/serial/utest/v2/uart_blocking_tx.c
  • components/drivers/serial/utest/v2/uart_flush_rx.c
  • components/drivers/serial/utest/v2/uart_flush_txb.c
  • components/drivers/serial/utest/v2/uart_flush_txnb.c
  • components/drivers/serial/utest/v2/uart_get_unread_bytes_count.c
  • components/drivers/serial/utest/v2/uart_nonblocking_rx.c
  • components/drivers/serial/utest/v2/uart_nonblocking_tx.c
  • components/drivers/serial/utest/v2/uart_overflow_rxb_txb.c
  • components/drivers/serial/utest/v2/uart_rxb_txb.c
  • components/drivers/serial/utest/v2/uart_rxb_txnb.c
  • components/drivers/serial/utest/v2/uart_rxnb_txb.c
  • components/drivers/serial/utest/v2/uart_rxnb_txnb.c

📊 Current Review Status (Last Updated: 2025-10-14 10:15 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.

@Ryan-CW-Code
Copy link
Contributor

path: examples/utest/testcases/drivers/serial_v2

可以帮忙改下这里的路径吗

@unicornx
Copy link
Contributor Author

path: examples/utest/testcases/drivers/serial_v2

可以帮忙改下这里的路径吗

单独提了一个 pr #10811 来 fix 这个问题,因为考虑到和本 PR 并无直接关系。

@Rbb666 Rbb666 added this to the v5.2.2 milestone Oct 14, 2025
@Rbb666 Rbb666 merged commit 0d37125 into RT-Thread:master Oct 15, 2025
58 checks passed
@unicornx unicornx deleted the dev-utest-unify-configname branch October 15, 2025 06:22
unicornx added a commit to unicornx/rt-thread that referenced this pull request Oct 16, 2025
Which is missed in PR RT-Thread#10808 "utest: unify configname", add it.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
@unicornx unicornx mentioned this pull request Oct 16, 2025
unicornx added a commit to unicornx/rt-thread that referenced this pull request Oct 16, 2025
Which is missed in PR RT-Thread#10808 "utest: unify configname", add it.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Rbb666 pushed a commit that referenced this pull request Oct 16, 2025
Which is missed in PR #10808 "utest: unify configname", add it.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants