aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVedran Miletić <rivanvx@gmail.com>2020-03-09 20:55:17 +0100
committerGitHub <noreply@github.com>2020-03-09 21:55:17 +0200
commit912d7b7eea3d7c1f5f1879487690b1dd84c13f74 (patch)
tree5ed9b21e801ae12c82760fdc96a7f6cc4cef92db
parentcfb79d031605c45575daee2909c79a9251baaea0 (diff)
downloadmeson-912d7b7eea3d7c1f5f1879487690b1dd84c13f74.zip
meson-912d7b7eea3d7c1f5f1879487690b1dd84c13f74.tar.gz
meson-912d7b7eea3d7c1f5f1879487690b1dd84c13f74.tar.bz2
Document the requirement to run tests before coverage [skip ci]
Co-authored-by: Vedran Miletić <vedran@miletic.net>
-rw-r--r--docs/markdown/Feature-autodetection.md5
-rw-r--r--docs/markdown/Unit-tests.md12
2 files changed, 16 insertions, 1 deletions
diff --git a/docs/markdown/Feature-autodetection.md b/docs/markdown/Feature-autodetection.md
index a4e8e45..c1b7659 100644
--- a/docs/markdown/Feature-autodetection.md
+++ b/docs/markdown/Feature-autodetection.md
@@ -32,3 +32,8 @@ reports can then be produced simply by calling e.g. `ninja
coverage-xml`. As a convenience, a high-level *coverage* target is
also generated which will produce all 3 coverage report types, if
possible.
+
+Note that generating any of the coverage reports described above
+requires the tests (i.e. `ninja test`) to finish running so the
+information about the functions that are called in the tests can be
+gathered for the report.
diff --git a/docs/markdown/Unit-tests.md b/docs/markdown/Unit-tests.md
index 97ee867..0785549 100644
--- a/docs/markdown/Unit-tests.md
+++ b/docs/markdown/Unit-tests.md
@@ -36,7 +36,17 @@ This feature can be disabled as discussed in [test()](Reference-manual.md#test).
## Coverage
-If you enable coverage measurements by giving Meson the command line flag `-Db_coverage=true`, you can generate coverage reports. Meson will autodetect what coverage generator tools you have installed and will generate the corresponding targets. These targets are `coverage-xml` and `coverage-text` which are both provided by [Gcovr](http://gcovr.com) (version 3.3 or higher) and `coverage-html`, which requires [Lcov](https://ltp.sourceforge.io/coverage/lcov.php) and [GenHTML](https://linux.die.net/man/1/genhtml) or [Gcovr](http://gcovr.com). As a convenience, a high-level `coverage` target is also generated which will produce all 3 coverage report types, if possible.
+If you enable coverage measurements by giving Meson the command line flag
+`-Db_coverage=true`, you can generate coverage reports after running the tests
+(running the tests is required to gather the list of functions that get
+called). Meson will autodetect what coverage generator tools you have installed
+and will generate the corresponding targets. These targets are `coverage-xml`
+and `coverage-text` which are both provided by [Gcovr](http://gcovr.com)
+(version 3.3 or higher) and `coverage-html`, which requires
+[Lcov](https://ltp.sourceforge.io/coverage/lcov.php) and
+[GenHTML](https://linux.die.net/man/1/genhtml) or
+[Gcovr](http://gcovr.com). As a convenience, a high-level `coverage` target is
+also generated which will produce all 3 coverage report types, if possible.
The output of these commands is written to the log directory `meson-logs` in your build directory.