Search code examples
linuxperlcode-coveragelcov

Unable to merge coverage data using genhtml


I'm using genhtml (in Windows under cygwin) to generate a unit test coverage report from 2 coverage data files. They are all coverage data from the same unit test source file.

However, when I entered the following command:

perl genhtml /home/administrator/coverage1.dat /home/administrator/coverage2.dat

I got the following output and problem:

Reading data file /home/administrator/coverage1.dat
Reading data file /home/administrator/coverage2.dat
genhtml: Can't use an undefined value as a HASH reference at genhtml line 1506.

And it failed to generate anything.

I played around with the files, and discovered that one reason might be because of the repeating headers and files in the coverage data.

Is this a known issue, or does anyone know a way to get around it, or am I on the wrong track?

Thanks.


Solution

  • I have downloaded the latest lcov and genhtml from sourceforge. It fixed the problem.

    Thanks.