diff options
author | Joel Klinghed <the_jk@spawned.biz> | 2018-02-27 21:46:08 +0100 |
---|---|---|
committer | Joel Klinghed <the_jk@spawned.biz> | 2018-02-27 21:58:05 +0100 |
commit | 6266089866469c2a2d298b79df74d2aad86bbeea (patch) | |
tree | dfdcd675b8a367c6433f7e3aa034a283be6379d7 /docs/markdown | |
parent | da017702613d718ac69ae213ee91358566f7b622 (diff) | |
download | meson-6266089866469c2a2d298b79df74d2aad86bbeea.zip meson-6266089866469c2a2d298b79df74d2aad86bbeea.tar.gz meson-6266089866469c2a2d298b79df74d2aad86bbeea.tar.bz2 |
Allow gcovr >= 3.1 to be used to generate html coverage report
Modern gcovr includes html generation support so if lcov and
genhtml are not available fallback to gcovr.
Kept lcov and genhtml as default so to not surprise existing
users of coverage-html with the different output of gcovr.
gcovr added html support in 3.0 but as there already is a test
for 3.1 because of the changes to -r/--rootdir I opted to only
allow html generation for >= 3.1 to keep things simple.
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Feature-autodetection.md | 2 | ||||
-rw-r--r-- | docs/markdown/Unit-tests.md | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/markdown/Feature-autodetection.md b/docs/markdown/Feature-autodetection.md index 65318ec..f865174 100644 --- a/docs/markdown/Feature-autodetection.md +++ b/docs/markdown/Feature-autodetection.md @@ -16,4 +16,4 @@ If you do not wish to use CCache for some reason, just specify your compiler wit Coverage -- -When doing a code coverage build, Meson will check the existence of binaries `gcovr`, `lcov` and `genhtml`. If the first one is found, it will create targets called *coverage-text* and *coverage-xml*. If the latter two are found, it generates the target *coverage-html*. You can then generate coverage reports just by calling e.g. `ninja coverage-xml`. +When doing a code coverage build, Meson will check the existence of binaries `gcovr`, `lcov` and `genhtml`. If the first one is found, it will create targets called *coverage-text* and *coverage-xml*. If the latter two or a new enough `gcovr` is found, it generates the target *coverage-html*. You can then generate coverage reports just by calling e.g. `ninja coverage-xml`. diff --git a/docs/markdown/Unit-tests.md b/docs/markdown/Unit-tests.md index afbeaa0..53ce9ec 100644 --- a/docs/markdown/Unit-tests.md +++ b/docs/markdown/Unit-tests.md @@ -30,7 +30,7 @@ Note how you need to specify multiple values as an array. 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) and `coverage-html`, which requires [Lcov](https://ltp.sourceforge.io/coverage/lcov.php) and [GenHTML](https://linux.die.net/man/1/genhtml). +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) 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) with html support. The output of these commands is written to the log directory `meson-logs` in your build directory. |