test(ci): update coverage filter and register test targets - #767
Conversation
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
|
Note
详情{
"tests/singleton/singleapplication_test.cpp": [
{
"line": " QString key = \"ut-single-main\";",
"line_number": 75,
"rule": "S106",
"reason": "Var naming | 4ec0ad194f"
},
{
"line": " QString key = \"ut-single-main\";",
"line_number": 81,
"rule": "S106",
"reason": "Var naming | 4ec0ad194f"
}
]
} |
Exclude 0%-coverage plugin entry points from lcov filter, register singleton and transfer_helper test targets, add session_core test sources to coop_gui build. 更新lcov覆盖率过滤规则排除不可测插件入口文件,注册singleton和 transfer_helper测试目标,将session_core测试源加入coop_gui构建。 Log: 更新覆盖率脚本和测试目标注册 Influence: 修改覆盖率过滤规则和CMake配置,影响测试构建和报告生成。
deepin pr auto review★ 总体评分:95分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 当前代码质量已经很高,无需修复。
// 以下是一个可选的微小改进示例,在 transferhelper_ct_test.cpp 中提取重复的 JSON 构建逻辑,
// 虽然当前已通过 makeDevJson 函数实现,但可以进一步将其提取为共享的测试工具类,
// 以便在 session_core_deep_test.cpp 和 transferhelper_ct_test.cpp 之间复用。
// tests/common/test_json_helper.h
#pragma once
#include <QString>
#include <QJsonObject>
#include <QJsonDocument>
#include <QVariantMap>
#include "global_defines.h"
namespace test_utils {
static QString makeDevJson(const QString &ip, const QString &name,
int transMode = 0, int discoveryMode = 0)
{
QVariantMap map;
map.insert(AppSettings::IPAddress, ip);
map.insert(AppSettings::DeviceNameKey, name);
map.insert(AppSettings::DiscoveryModeKey, discoveryMode);
map.insert(AppSettings::TransferModeKey, transMode);
map.insert(AppSettings::LinkDirectionKey, 0);
map.insert(AppSettings::ClipboardShareKey, false);
map.insert(AppSettings::PeripheralShareKey, false);
map.insert(AppSettings::CooperationEnabled, true);
map.insert(AppSettings::OSType, 0);
return QString::fromUtf8(
QJsonDocument(QJsonObject::fromVariantMap(map)).toJson(QJsonDocument::Compact));
}
} |
|
Note
详情{
"tests/singleton/singleapplication_test.cpp": [
{
"line": " QString key = \"ut-single-main\";",
"line_number": 75,
"rule": "S106",
"reason": "Var naming | 4ec0ad194f"
},
{
"line": " QString key = \"ut-single-main\";",
"line_number": 81,
"rule": "S106",
"reason": "Var naming | 4ec0ad194f"
}
]
} |
|
[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 |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
Exclude 0%-coverage plugin entry points from lcov filter, register singleton and transfer_helper test targets, add session_core test sources to coop_gui build.
更新lcov覆盖率过滤规则排除不可测插件入口文件,注册singleton和
transfer_helper测试目标,将session_core测试源加入coop_gui构建。
Log: 更新覆盖率脚本和测试目标注册
Influence: 修改覆盖率过滤规则和CMake配置,影响测试构建和报告生成。