qgis/QGIS — pull request #1712 by nyalldawson (2014-12-01 05:07:32+00:00)
Title: 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.