English 中文(简体)
Error on syntax for generating coverage data from multiple files using lcov in Windows
原标题:

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.

最佳回答

Worked out to be that there were repeating results in the coverage data. I took out the repeating data, and the error disappeared.

Thanks.

问题回答

暂无回答




相关问题
Why does my chdir to a filehandle not work in Perl?

When I try a "chdir" with a filehandle as argument, "chdir" returns 0 and a pwd returns still the same directory. Should that be so? I tried this, because in the documentation to chdir I found: "...

How do I use GetOptions to get the default argument?

I ve read the doc for GetOptions but I can t seem to find what I need... (maybe I am blind) What I want to do is to parse command line like this myperlscript.pl -mode [sth] [inputfile] I can use ...

Object-Oriented Perl constructor syntax and named parameters

I m a little confused about what is going on in Perl constructors. I found these two examples perldoc perlbot. package Foo; #In Perl, the constructor is just a subroutine called new. sub new { #I ...

Where can I find object-oriented Perl tutorials? [closed]

A Google search yields a number of results - but which ones are the best? The Perl site appears to contain two - perlboot and perltoot. I m reading these now, but what else is out there? Note: I ve ...

热门标签