-
Notifications
You must be signed in to change notification settings - Fork 9
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
Improve coverage tool for P3 Analysis Library integration #41
base: main
Are you sure you want to change the base?
Conversation
@swright87 - I've added |
The latest coverage schema from the P3 Analysis Library is 0.3.0, which requires each entry to provide: - A file name; - A unique ID; and - A simplified line representation (line numbers or regions) Signed-off-by: John Pennycook <[email protected]>
Previously, a CodeNode could only recover region information in terms of an extent (start line and end line) which was not sufficient to export the information required by the new coverage format. Signed-off-by: John Pennycook <[email protected]>
Invokes internal codebasin functionality to compute coverage information corresponding to a single compilation database. Signed-off-by: John Pennycook <[email protected]>
Reimplements the cbicov script as one with support for multiple commands, exposing the previous default behavior of the cbicov prototype via the "cbicov compute" command. The new command also defaults to an output file called "coverage.json", since this filename was used by 99% of all cbicov invocations in our testing. Although slightly more complicated, switching to a command-based implementation will enable us to add more commands related to coverage (e.g., converting between coverage formats, visualizing coverage, etc) without needing to create dedicated command-line interfaces for each. Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
@laserkelvin, @rfbgo, @douglasjacobsen, @kaanolgu, @tomdeakin, @swright87 - Please take a look at this. Things had gotten too far behind main to be merged as-is, and rebasing was giving me a headache, which is why I had to force-push. I took the opportunity to clean a few things up and make some improvements based on our experience with the P3 automation framework and anticipated future features. The individual commit messages should explain what's going on, but to summarize:
Some specific requests:
|
In addition to being simpler, we can leverage the indent option to improve the readability of the output file. Signed-off-by: John Pennycook <[email protected]>
Previously the test checked that cbicov exported information about every line in a file, instead of checking that cbicov exported information about every compiled line. Signed-off-by: John Pennycook <[email protected]>
cbicov compute runs as-if it was configured with a single platform. Any node without any associated platform was not compiled, and should be excluded from the coverage JSON. Signed-off-by: John Pennycook <[email protected]>
This PR introduces a new standalone
cbicov
tool that reads a compilation database and produces JSON that can be read in by the P3 Analysis Library. It is intended to be invoked as below: