在 Windows 中使用 lcov 从多个文件生成覆盖率数据的语法错误
我需要一些帮助...我在想出在 Windows 中使用 lcov 从多个文件生成覆盖率数据的语法时遇到问题。
我在 cygwin 上安装了 gcov、lcov 和 genhtml(我在 Windows 下运行)。所有这些文件都位于 cygwin/bin 目录中。我相信我刷新的覆盖率数据是从 JsTestCoverage 并具有以下格式:
SF:C:/test/jquery.js
DA:22,1
DA:23,1
...
end_of_record
SF:C:/test/testFile.js
DA:3,1
DA:6,1
...
end_of_record
//rinse and repeat till no more files
注意我尚未在覆盖数据上使用 genhtml。
然后我尝试了类似的操作:
perl genhtml /../home/administrator/coverage1.dat /../home/administrator/coverage2.dat
但出现错误:
genhtml: Can't use an undefined value as a HASH reference at genhtml line 1506.
我也不确定我的过程是否错误,根本不是来自 Linux 背景。
提前致谢。
I would like some help... I'm having trouble coming up with the syntax to generate coverage data from multiple files using lcov in Windows.
I have gcov, lcov and genhtml installed on cygwin (I'm running this under Windows). All of those files are inside cygwin/bin directory. The coverage data I flush through I believe are perl scripts created from JsTestCoverage and has the following format:
SF:C:/test/jquery.js
DA:22,1
DA:23,1
...
end_of_record
SF:C:/test/testFile.js
DA:3,1
DA:6,1
...
end_of_record
//rinse and repeat till no more files
Note I have NOT used genhtml on the coverage data yet.
I then tried something like:
perl genhtml /../home/administrator/coverage1.dat /../home/administrator/coverage2.dat
But got an error saying:
genhtml: Can't use an undefined value as a HASH reference at genhtml line 1506.
I'm not sure whether I've got the process wrong either, being not from linux background at all.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
结果发现覆盖数据中存在重复结果。我把重复的数据拿出来,错误就消失了。
谢谢。
Worked out to be that there were repeating results in the coverage data. I took out the repeating data, and the error disappeared.
Thanks.