test: 增量补全未覆盖方法单元测试(DeviceNetwork/Print/Storage/DBusDriverInterface/EDIDParser) - #727
test: 增量补全未覆盖方法单元测试(DeviceNetwork/Print/Storage/DBusDriverInterface/EDIDParser)#727add-uos wants to merge 1 commit into
Conversation
…hods Incrementally cover previously-uncovered functions and raise function coverage on the GUI (deepin-devicemanager) test binary. Batch classes covered: - DeviceManager/DeviceNetwork: vendor, isWireless, hwAddress, canDisable - DeviceManager/DevicePrint: vendor, makeAndeModel - DeviceManager/DeviceStorage: getManfName, getOemName - DriverControl/DBusDriverInterface: installDriver(1&2 args), undoInstallDriver, backupDeb, delDeb, aptUpdate - GenerateDevice/EDIDParser: hexToBin Batch stats: 27 new test cases, all passing. Full suite 1121 cases, 1115 passed; 6 pre-existing failures (keyboard-device parsing, environment related, not introduced by this batch). GUI function coverage: 87.3% -> 88.2%. Baseline commit: 89825dc (2026-08-06) fix(gpu): fix GPU VRAM size parsing failure on multi-line gpu-info
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos 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 |
Reviewer's GuideAdds new GoogleTest-based unit tests to incrementally cover previously untested accessor and helper methods across DeviceNetwork, DevicePrint, DeviceStorage, DBusDriverInterface, and EDIDParser, relying on existing test infrastructure, DBus stubs, and -fno-access-control to safely exercise internal logic and improve function coverage. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
TAG Bot New tag: 6.0.70 |
增量补全未覆盖函数单元测试(批次 1)
本 PR 增量补全 GUI(deepin-devicemanager)测试中此前未覆盖的方法,提升函数覆盖率。所有新增测试文件均放在项目既有的
tests/src/<模块>/目录下,构建通过file(GLOB_RECURSE)自动纳入,无需改动 CMakeLists。本批次覆盖的方法
vendor,isWireless,hwAddress,canDisablevendor,makeAndeModelgetManfName,getOemNameinstallDriver(1/2 参),undoInstallDriver,backupDeb,delDeb,aptUpdatehexToBin构建与验证
CMAKE_COVERAGE_ARG=CMAKE_COVERAGE_ARG_ONmake deepin-devicemanager-test通过既有失败(非本批次引入)
6 个既有失败均为键盘设备解析相关(依赖
hwinfo/lshw//proc/bus/input/devices在容器内缺失),属环境相关:UT_DeviceManager_addKeyboardDeviceUT_CmdTool_loadHciconfigInfo_002UT_DeviceGenerator_generatorKeyboardDeviceUT_DeviceGenerator_getKeyboardInfoFromHwinfo/Lshw/CatDevices基线
89825dcd(2026-08-06) fix(gpu): fix GPU VRAM size parsing failure on multi-line gpu-infoSummary by Sourcery
Add incremental unit tests to increase coverage for previously untested device and driver helper methods.
Tests: