将 --no-external 标志添加到 lcov 命令后,genhtml 不生成覆盖率报告

irk*_*rky 8 c++ code-coverage lcov

我想从我的覆盖率报告中排除外部库的代码,所以我在 lcov 命令中添加了 --no-external 标志。不幸的是,添加此标志后 genhtml 无法生成覆盖率报告。

使用的命令:

lcov --directory 。-c -o coverage.info -t "coverage_result" --no-external

结果:

genhtml: 错误: 在跟踪文件coverage.info 中找不到有效记录

此外,coverage.info 文件看起来已损坏:

TN:coverage_result
TN:coverage_result
TN:coverage_result
TN:coverage_result

有没有人有类似的问题?