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 <dmitrii.golovanov@intel.com>
This commit is contained in:
Dmitrii Golovanov 2023-12-20 16:34:37 +01:00 committed by Carles Cufí
parent 0b999c0943
commit 8e3a3b4845
2 changed files with 6 additions and 2 deletions

View File

@ -142,7 +142,11 @@ or::
$ twister --coverage -p native_sim -T tests/bluetooth
which will produce ``twister-out/coverage/index.html`` with the report.
which will produce ``twister-out/coverage/index.html`` report as well as
the coverage data collected by ``gcovr`` tool in ``twister-out/coverage.json``.
Other reports might be chosen with ``--coverage-tool`` and ``--coverage-formats``
command line options.
The process differs for unit tests, which are built with the host
toolchain and require a different board::

View File

@ -305,7 +305,7 @@ structure in the main Zephyr tree: boards/<arch>/<board_name>/""")
"This option may be used multiple times. "
"Default to what was selected with --platform.")
parser.add_argument("--coverage-tool", choices=['lcov', 'gcovr'], default='lcov',
parser.add_argument("--coverage-tool", choices=['lcov', 'gcovr'], default='gcovr',
help="Tool to use to generate coverage report.")
parser.add_argument("--coverage-formats", action="store", default=None, # default behavior is set in run_coverage