Resolution of genhtml: ERROR: cannot create directory !

April 25, 2012 in JavaScript, JsTestDriver, Unit Testing, Web 2.0

When using the LCOV Visualizer tool to generate the HTML reports from the JsTestDriver lcov coverage (.dat) file (usually jsTestDriver.conf-coverage.dat) using the genhtml command:

genhtml jsTestDriver.conf-coverage.dat

You may find the following error:

mkdir: cannot create directory `': No such file or directory
genhtml: ERROR: cannot create directory !

This error happens because the paths of the JavaScript files are not correct in the (.dat) file. To fix this error, open the (.dat) file, you will find its content as follows:

SF:<<Path1>>
DA:1,1
DA:2,1
DA:5,1
...
end_of_record
SF:<<Path2>>
DA:1,1
DA:2,0
DA:5,1
...
end_of_record

Then edit the SF: values with the correct paths of the JavaScript source (and testing) files and execute the genhtml command again to generate the HTML testing report.

One comment on “Resolution of genhtml: ERROR: cannot create directory !

  1. Pingback: IT技术园地

Leave a reply

Your email address will not be published. Required fields are marked *

320,974 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by sweet Captcha