test(basekit): raise unit test coverage to 60% and fix crashing tests#740
test(basekit): raise unit test coverage to 60% and fix crashing tests#740pengfeixx wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
There was a problem hiding this comment.
Sorry @pengfeixx, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Warning
详情 {
"export": {
"src/lib/cooptests/helper_test.cpp": {
"b": [
" // Reproduce the join logic; the private helper is not exported, so we"
]
},
"test-prj-running.sh": {
"b": [
"export QT_QPA_PLATFORM=\"${QT_QPA_PLATFORM:-offscreen}\" # GUI \u6d4b\u8bd5\u65e0\u5934\u8fd0\u884c (cooperation-core \u7b49)"
]
}
}
} |
0ed4db5 to
c546a36
Compare
|
Warning
详情 {
"export": {
"src/lib/cooptests/helper_test.cpp": {
"b": [
" // Reproduce the join logic; the private helper is not exported, so we"
]
},
"test-prj-running.sh": {
"b": [
"export QT_QPA_PLATFORM=\"${QT_QPA_PLATFORM:-offscreen}\" # GUI \u6d4b\u8bd5\u65e0\u5934\u8fd0\u884c (cooperation-core \u7b49)"
]
}
}
} |
deepin pr auto review★ 总体评分:85分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 # 修复 src/lib/tests/CMakeLists.txt 中的硬编码绝对路径问题
# 旧代码:
# /home/uos/work/单元测试/dde-cooperation/3rdparty/QtZeroConf)
# 新代码:
target_include_directories(lib_logic_tests PRIVATE
${CMAKE_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/../common
${CMAKE_CURRENT_SOURCE_DIR}/../common/proto
${CMAKE_CURRENT_SOURCE_DIR}/../common/httpweb
${CMAKE_CURRENT_SOURCE_DIR}/../common/session
${CMAKE_CURRENT_SOURCE_DIR}/../cooperation/core
${CMAKE_CURRENT_SOURCE_DIR}/../cooperation/core/net
${CMAKE_CURRENT_SOURCE_DIR}/../cooperation/core/net/helper
${CMAKE_CURRENT_SOURCE_DIR}/../cooperation/core/discover
${CMAKE_CURRENT_SOURCE_DIR}/../cooperation/dfmplugin
${CMAKE_CURRENT_SOURCE_DIR}/../data-transfer/quazip
${CMAKE_SOURCE_DIR}/3rdparty/QtZeroConf) |
c546a36 to
42e1ded
Compare
|
Warning
详情 {
"export": {
"src/lib/cooptests/helper_test.cpp": {
"b": [
" // Reproduce the join logic; the private helper is not exported, so we"
]
},
"test-prj-running.sh": {
"b": [
"export QT_QPA_PLATFORM=\"${QT_QPA_PLATFORM:-offscreen}\" # GUI \u6d4b\u8bd5\u65e0\u5934\u8fd0\u884c (cooperation-core \u7b49)"
]
}
}
} |
42e1ded to
06d0a3c
Compare
|
Warning
详情 {
"export": {
"src/lib/cooptests/helper_test.cpp": {
"b": [
" // Reproduce the join logic; the private helper is not exported, so we"
]
}
}
} |
Raise basekit coverage 13%->60% by fixing crashing tests; add lib (cooperation-core/proto) tests with direct-compile harness; add ENABLE_AUTO_UNIT_TEST guards and gcov flush shim to collect coverage from running the real apps. 修复basekit崩溃测试使覆盖率13%->60%;新增lib(cooperation-core/proto)单元测试 (直接编译harness);加ENABLE_AUTO_UNIT_TEST宏与gcov flush桩支持运行真实程序采集覆盖率。 Log: 新增多模块单元测试与覆盖率采集基建 Influence: basekit覆盖率13%->60%,运行真实程序使data-transfer覆盖0%->37.8%,新增全量覆盖率脚本与gcov flush桩。
06d0a3c to
bcf2e97
Compare
Fix HashMap/FileCache tests that aborted the whole gtest process and add new tests for directory/errors/reader-writer modules.
修复导致整个gtest进程中途崩溃的HashMap/FileCache测试,并新增
directory、errors、reader-writer等模块的单元测试用例。
Log: 提升basekit单元测试覆盖率至60%
Influence: basekit库行覆盖率从13.0%提升至60.9%,128个测试全部通过。