Repository navigation
fix: add missing src include dir to UT targets - #707
Conversation
1. test_common2 and md_add_test targets failed to find ddlog.h
2. Add ${CMAKE_SOURCE_DIR}/src to their include directories
3. Restores ~40 test targets aborted mid-build on UT cluster
Log: No user-facing changes
Influence:
1. Rebuild with BUILD_TESTS=ON and confirm all UT targets compile
2. Run test_common2, test_markdownimagehandler and test_markdownview
3. Check CI UT summary case count restored from 128 to full set
fix: 为UT目标补充缺失的src头文件搜索路径
1. test_common2与md_add_test目标编译时找不到ddlog.h而中断
2. 在其include路径中补充${CMAKE_SOURCE_DIR}/src
3. 恢复UT集群上因编译中断而丢失的约40个测试目标
Log: 无用户可见变化
Influence:
1. 开启BUILD_TESTS=ON重新编译,确认全部UT目标可编译
2. 运行test_common2、test_markdownimagehandler、test_markdownview
3. 检查CI的UT统计用例数从128条恢复至完整数量
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR fixes incomplete UT builds by adding the missing source-root include directory to the markdown test helper and test_common2 target, allowing sources that include ddlog.h to compile and preventing silent omission of subsequent test targets. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, pengfeixx 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 |
|
/merge |
Summary
test_markdownimagehandler(测试 TU 直接 includemarkdownview.cpp)和test_common2(编译被测源码text_file_saver.cpp)均报fatal error: ddlog.h: 没有那个文件或目录。target_include_directories缺少${CMAKE_SOURCE_DIR}/src,而ddlog.h位于src/下,导致#include "ddlog.h"无法解析。Changes
tests/editor_markdown/CMakeLists.txt:md_add_test()公共 include 路径增加${CMAKE_SOURCE_DIR}/src,同时覆盖同样直接编译markdownview.cpp的test_markdownview。tests/common2/CMakeLists.txt:test_common2增加${CMAKE_SOURCE_DIR}/src(该目标中的config.cpp同样 include 了 ddlog.h)。Testing
BUILD_TESTS=ON本地重新编译test_common2/test_markdownimagehandler/test_markdownview,均编译通过Summary by Sourcery
Restore unit-test builds by adding the project source directory to the affected test targets’ include paths.
Bug Fixes:
Build:
Tests: