diff options
Diffstat (limited to 'docs/devel/testing.rst')
-rw-r--r-- | docs/devel/testing.rst | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index f33e5a8423..5e19cd50da 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -158,12 +158,21 @@ rarely used. See "QEMU iotests" section below for more information. GCC gcov support ---------------- -``gcov`` is a GCC tool to analyze the testing coverage by instrumenting the -tested code. To use it, configure QEMU with ``--enable-gcov`` option and build. -Then run ``make check`` as usual. There will be additional ``gcov`` output as -the testing goes on, showing the test coverage percentage numbers per analyzed -source file. More detailed reports can be obtained by running ``gcov`` command -on the output files under ``$build_dir/tests/``, please read the ``gcov`` +``gcov`` is a GCC tool to analyze the testing coverage by +instrumenting the tested code. To use it, configure QEMU with +``--enable-gcov`` option and build. Then run ``make check`` as usual. + +If you want to gather coverage information on a single test the ``make +clean-coverage`` target can be used to delete any existing coverage +information before running a single test. + +You can generate a HTML coverage report by executing ``make +coverage-report`` which will create +./reports/coverage/coverage-report.html. If you want to create it +elsewhere simply execute ``make /foo/bar/baz/coverage-report.html``. + +Further analysis can be conducted by running the ``gcov`` command +directly on the various .gcda output files. Please read the ``gcov`` documentation for more information. QEMU iotests |