Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previous pull request message is below. Test are run for all platforms, and coverage is measured on linux only.
We now have an ability to measure code coverage(stunning 2% right now ;)). This closes #298.
While the commit may seem a bit complicated at first, everything boils down to compilation with
--coverage
. Basically this have to be a new 'flavour' of build as coverage measurements is built into application as a shared library, so it's unusable for end-users. Due to the waymake/qmake
works, enabling/disabling coverage requiresmake distclean
before changing flavour(ie. from release to coverage) so that all object files are rebuild(alternatively one can runmake clean
andqmake -r
, which will updateMakefiles
).There are 4 frontends for displaying code coverage added as make targets. Those are:
gcov, lcov, codecov and coveralls
. First two create code-coverage report locally, either as text-files(gcov
, files are located insrc/
with.gcov
extension) or html report(lcov
, located insrc/lcov
). The other two uploads code coverage to external services(respectively codecov and coveralls). Please note thatcodecov
does not include files with no coverage(due to the bug in gcov), so the total coverage percentage is quite misleading.In order to be able to see current code coverage:
$ make distclean
$ qmake CONFIG+=coverage qtpro.pro
$ make lcov
Also from now, all tests can be run with
make check
.Travis creates code-coverage report using linux build, as I don't know how to install required stuff(lcov, coveralls-lcov(this is ruby gem)) on osx. Build steps shall be the same.