genhtml:错误:无法仅在 Linux 上读取文件路径

问题描述 投票:0回答:1

我生成 lcov 文件并使用 genhtml 生成 html 报告文件:

genhtml out/cov.info -o out/temp

在 Windows 上它工作正常并且生成了 index.html,而在 Linux 中我收到此错误:

Found 1 entries.
Found common filename prefix "/absolute/path/files/data"
Writing .css and .png files.
Generating output.
Processing file file/file.py
genhtml: ERROR: cannot read /absolute/path/files/file.py

我检查了这个文件 /absolute/path/files/file.py 是否存在 我对此文件应用了 chmod 777,仍然有此错误。 此外,在 cov.info 文件中,源文件 SF:/absolute/path/files/file.py 是正确的并且具有有效的记录。

linux code-coverage gcov lcov
1个回答
0
投票

如果 gcno 文件的编译时间戳与用于执行测试用例的二进制文件不同,Gcov 将抛出这些错误。为了简化这一点,每当编译二进制文件时,请更新这些文件,然后重新运行 .应该有效

© www.soinside.com 2019 - 2024. All rights reserved.