Machine readable output of coverage
When integrating with a CI system, it might be useful to fail the build, alert or take other actions based on coverage percentage. To do that, hpc needs to output a summary coverage report in a machine readable format.
For example, the current output:
38% expressions used (1779/4624)
57% boolean coverage (16/28)
56% guards (9/16), 6 always True, 1 always False
58% 'if' conditions (7/12), 2 always False, 3 unevaluated
100% qualifiers (0/0)
7% alternatives used (103/1410)
75% local declarations used (102/136)
40% top-level declarations used (185/457)
can be represented as:
{
expressions: { total: 4624, used: 1779, percentage: 0.38 },
boolean: { total: 28, used: 16, percentage: 0.57 },
<...>
}
This output can be then parsed to decide whether to fail the build, produce a coverage graph over time, etc.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.2 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Code Coverage |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |