Skip to content

Commit 8e3a3b4

Browse files
golowanowcarlescufi
authored andcommitted
twister: coverage: GCOVR as defautlt coverage reporting tool
Twister now uses GCOVR by default as the more reliable code coverage reporting tool instead of LCOV. Signed-off-by: Dmitrii Golovanov <[email protected]>
1 parent 0b999c0 commit 8e3a3b4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/develop/test/coverage.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ or::
142142

143143
$ twister --coverage -p native_sim -T tests/bluetooth
144144

145-
which will produce ``twister-out/coverage/index.html`` with the report.
145+
which will produce ``twister-out/coverage/index.html`` report as well as
146+
the coverage data collected by ``gcovr`` tool in ``twister-out/coverage.json``.
147+
148+
Other reports might be chosen with ``--coverage-tool`` and ``--coverage-formats``
149+
command line options.
146150

147151
The process differs for unit tests, which are built with the host
148152
toolchain and require a different board::

scripts/pylib/twister/twisterlib/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def add_parse_arguments(parser = None):
305305
"This option may be used multiple times. "
306306
"Default to what was selected with --platform.")
307307

308-
parser.add_argument("--coverage-tool", choices=['lcov', 'gcovr'], default='lcov',
308+
parser.add_argument("--coverage-tool", choices=['lcov', 'gcovr'], default='gcovr',
309309
help="Tool to use to generate coverage report.")
310310

311311
parser.add_argument("--coverage-formats", action="store", default=None, # default behavior is set in run_coverage

0 commit comments

Comments
 (0)