-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code coverage with NVC produces no output #52
Comments
Code coverage for NVC is still a work in progress. If you know the command options I can get it setup - otherwise I will talk to Nick |
Thanks for replying quickly. Looks like when elaborating, the coverage types can be specified like so
Where I guess you could fetch the coverage options from your OsvvmScript Looks like you can merge the coverage from each test case too, like so:
That is about as much as I can glean from the documentation, I have not tried nvc code coverage feature natively. More information can be found from Nick's website https://www.nickg.me.uk/nvc/manual.html#CODE_COVERAGE Thanks for your work on Osvvm |
Update: I have managed to get code coverage results to generate to std output stream, however, there seems to be some issues with writing the output results to a named file. I am uncertain if this is a permission issue in the directory and will revisit this in a few hours. I will make a PR later if I can make it work nicely with OsvvmScripts |
Hi Aaron First check your code for file close. Sometimes this happens due to a previous code version not running to completion. In either case when developing I have had to delete files from previous runs in the OS to get the next run able to run. Some times the requires a 2 level call mechanism
|
Thanks, the issue preceeds OsvvmScripts - it is nvc that is apparently not writing an output coverage file to disk, I'm looking at the source now to try and determine if its an oddity in my environment or nvc itself |
What I have run into is the new file can't be created if the old file exists and is still open. |
Okay, some more info here. I think the manual for NVC was slightly out of date, as the documentation for usage of code coverage appears to have changed since I last accessed Nick's website. Last week, the command was listed as
but this generated no xml files of the input name, and instead generated a covdb with the name _MYLIB.TB_NAME.elab.covdb The example usage has now changed to
where I guess you are no longer supposed to supply a name for the coverage database. You then merge each .elab.covdb using
So I guess OsvvmScripts can just run the -c command as a post script and then your TestReport html can just point to the generated coverage html file. I'm not sure what you're currently working on for Osvvm - probably more important things than experimental code coverage for nvc. If you like, I can make a PR for Osvvm scripts to support this |
A PR for this would be great. What I did for other tools is in the coverage directory, I created a directory for each test suite and put the coverage from each test case there. When a test suite finishes, the test case reports are merged and put into a test suite coverage report in a directory named to match the build. When the build finishes, all test suite reports are merged and put into the main coverage directory - and then an html report is generated for the build. |
Hi, I ran into this discussion, and dare to add few bits that may help. Commands to manipulate NVCs code coverage database (*.covdb file) are are now: To export to different coverage format (currently only Cobertura is supported):
To merge code coverage from multiple simulation runs:
To generate code coverage report:
The It is possible to generate "per-test" report if you use |
I am tinkering with integrating OSVVMs functional coverage into NVCs code coverage, |
Hi, hopefully this is not user error...
issue
no code coverage outputs are generated when enabling code coverage
the output I observe
Three directories are created in following structure:
...but the directories appear to be totally empty
the output I expect
The directories should have code cov or similar .xml files with which to display
extra info
It seems OSVVM is aware that code coverage is desired, as when I check the .html for the script, CodeCoverage is available as an option to click, but the code coverage html file does not exist, so clicking it results in a 404
I have a simple .pro script that attempts to turn code coverage on for NVC for some simple tests (no testsuites)
Possibly related to #43 if
std.env.stop(GetAlertCount)
is required for code coverageThe text was updated successfully, but these errors were encountered: