test: add comprehensive unit tests for dtkcore - #583
Conversation
1. Add 14 new test files covering DSysInfo, DConfig, DDBus, DCI, DFileSystemWatcher, DFileWatcher, DSettings, DTrash and more 2. Update 25 existing test files with improved coverage and fixes 3. Add dsysinfo_stub.cpp for LD_PRELOAD-based DSysInfo mocking 4. Update CMakeLists.txt with OBJECT library and stub integration 5. Tests validated: 808 passed / 0 failed across 15 execution rounds Influence: 1. Build with BUIILD_TESTING=ON and run ctest to verify all tests pass 2. Verify coverage metrics: line 85%, function 92.5%, branch 45.9% 3. Test DSysInfo mock with LD_PRELOAD stub in isolated environment test: 补充 dtkcore 单元测试代码 1. 新增 14 个测试文件,覆盖 DSysInfo、DConfig、DDBus、DCI、 DFileSystemWatcher、DFileWatcher、DSettings、DTrash 等模块 2. 更新 25 个已有测试文件,提升覆盖率并修复失败用例 3. 新增 dsysinfo_stub.cpp 实现 LD_PRELOAD 方式的 DSysInfo mock 4. 更新 CMakeLists.txt 集成 OBJECT 库与 stub 机制 5. 测试验证:15 轮执行 808 passed / 0 failed Influence: 1. 使用 BUIILD_TESTING=ON 编译并运行 ctest 验证全部测试通过 2. 验证覆盖率指标:行 85%、函数 92.5%、分支 45.9% 3. 在隔离环境中测试 DSysInfo mock 的 LD_PRELOAD stub 机制 PMS: TASK-DDE-209
There was a problem hiding this comment.
Sorry @MyLeeJiEun, your pull request is larger than the review limit of 150,000 diff characters
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: MyLeeJiEun The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @MyLeeJiEun. Thanks for your PR. 😃 |
|
Hi @MyLeeJiEun. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Summary
Add comprehensive unit test suite for dtkcore, validated across 15 execution rounds (808 passed / 0 failed).
Test Results
Changes
ut_*.cpp) covering DSysInfo, DConfig, DDBus, DCI, DFileSystemWatcher, DFileWatcher, DSettings, DTrash, and moredsysinfo_stub.cppfor LD_PRELOAD-based DSysInfo mockingCMakeLists.txtwith OBJECT library and stub integrationRelated Issue
MUL-DDE-209
How to Build & Test