-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
twister: coverage: Add optional JSON report on coverage
New Twister option `--coverage-sections` allows to select code coverage reports to compose into an additional JSON file (twister_coverage.json). By default, the new option is disabled. Currently this mode is fully supported for the default gcovr reporting tool only, as it is based on the gcovr JSON reports. For lcov, only the coverage run status is reported. The choices are to select either the coverage summary, or the detailed branch coverage, ztest coverage, or all the coverage data collected. Also the coverage run 'status' and coverage 'tool' values are added with any non-default choice. The 'environment' top object has additional 'gcov_tool' property with a full path to what binary tool has been used. Depending on `--coverage-split` and `--disable-coverage-aggregation` options the coverage data is attached either to its test suite object or/and as the report's top level object with the aggregated summary of the current test plan execution scope. In case of the custom report name, or per-platform report, the report name is composed with the rightmost '_coverage.json' suffix. The code coverage report has similar structure as `twister.json` and compelements it having reduced set of test suite properties: - instead of `testcases` it contains `coverage` object with gcov tool JSON report data embedded there; - other properites are limited to represent only the essential test suite context, thus to allow further data processing consistently and independently from the `twister.json`. Signed-off-by: Dmitrii Golovanov <[email protected]>
- Loading branch information
Showing
5 changed files
with
95 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters