1 Commits

Author SHA1 Message Date
Nyall Dawson
a435441239 Add support for generating coverage statistics for tests
Build option ENABLE_COVERAGE must be set. There's also a secondary
option GENERATE_COVERAGE_DOCS which requires lcov and will generate
html docs of unit test coverage.

To generate coverage, first enable the cmake options, then build
QGIS. From the build directory, run "make qgis_coverage".

You can also add command line arguments to "make qgis_coverage" which
are forwarded on to ctest. This allows for skipping failing tests
which prevent generation of coverage docs. This is done by adding
the command line argument CMD_ARGS= to the "make qgis_coverage"
command. Eg,

make qgis_coverage CMD_ARGS="-E \"PalLabeling|LocalServer|AppStartup\"

will skip tests which match the listed expressions.
2014-12-04 07:45:22 +11:00