Closed
[Bug-Report|缺陷反馈]: lcov>=2.0 严格校验导致 UT 覆盖率生成失败 #238
songkai111Add on Jun 29Closed at Jun 29
Jun 29 Added label: bug-report
songkai111
Jun 29 Comments:
Jun 29 Comments:
/assign @songkai111


Jun 29 Assign songkai111 as responsible person
Jun 29 Close issue
Jun 29 Added label: resolved
Describe the current behavior / 问题描述
scripts/util/generate_cpp_cov.sh在 lcov >= 2.0 环境下执行 UT 覆盖率生成时,因新版 lcov 对若干条件(mismatch、empty、negative 等)进行严格校验,而脚本仅对部分命令传入了--ignore-errors inconsistent,导致覆盖率采集(lcov -c)、过滤(lcov -r/lcov --remove)及 HTML 报告生成(genhtml)环节报错中断,无法生成覆盖率报告。Environment / 环境信息
scripts/util/generate_cpp_cov.shASCEND_HOME_PATH/ASCEND_PARENT_PATHSteps to reproduce the issue / 重现步骤
lcov -c(采集)、lcov -r/lcov --remove(过滤)、genhtml(生成报告)时,因严格校验报错退出。Describe the expected behavior / 预期结果
在 lcov >= 2.0 及更早版本环境下,覆盖率生成脚本均能稳定执行,正确生成
.info覆盖率文件及 HTML 报告,不因版本差异而中断。Related log / screenshot / 日志 / 截图
lcov >= 2.0 在 mismatch / empty / negative 等条件上执行严格校验,旧版仅忽略 inconsistent,故覆盖率生成流程中断。
Special notes for this issue / 备注
关联 PR:https://gitcode.com/cann/opbase/pull/574