Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Enable coverage testing #53

Merged
merged 1 commit into from
Mar 14, 2016
Merged

CI: Enable coverage testing #53

merged 1 commit into from
Mar 14, 2016

Conversation

dkopecek
Copy link
Contributor

  • Enable coverage testing by installing the lcov utility inside the
    travis sandbox.
  • Limit the coverage testing to GCC builds only as lcov doesn't seem
    to be able to process gcda files from a clang compiled project.
  • Add a coverage badge to the main README.md file.

@dkopecek
Copy link
Contributor Author

Do not merge this yet. There are still some problems with the coverage testing:

Processing src/tlog-test-fd-json-reader.gcda
Out of memory!

@dkopecek
Copy link
Contributor Author

Is seems this is happening only for the clang build. gcda files from GCC compiled build are processed without an error. There's no point in gathering the coverage information from two different compilers anyway, so I'll make sure that we do it only when building with GCC.

@dkopecek
Copy link
Contributor Author

Ok, looks like it's working.

@dkopecek dkopecek changed the title CI: install lcov to enable coverage testing CI: Enable coverage testing Mar 14, 2016
@spbnick
Copy link
Member

spbnick commented Mar 14, 2016

Thank you, Daniel, this looks good!
Yes, lcov is picky about the toolchain. Shouldn't llvm-cov be used instead with clang?
In any case, yes, we don't need coverage data from both compilers.
However, can we run coverage build with "--enable-debug"?

@dkopecek
Copy link
Contributor Author

@spbnick Does the test suite test more things with --enable-debug?

@spbnick
Copy link
Member

spbnick commented Mar 14, 2016

@dkopecek Well, assertions get executed and so are the validation functions.

@dkopecek
Copy link
Contributor Author

@spbnick I understand that this is good for validation, but does it make sense in the context of coverage testing?

@dkopecek
Copy link
Contributor Author

I'll try to enable it and lets see what happens.

 - Enable coverage testing by installing the lcov utility inside the
   travis sandbox.
 - Limit the coverage testing to GCC builds only as lcov doesn't seem
   to be able to process gcda files from a clang compiled project.
 - Add a coverage badge to the main README.md file.
 - Run coverage testing in debug mode.
@spbnick
Copy link
Member

spbnick commented Mar 14, 2016

@dkopecek I'm not sure, but at least we'll get to know which validation functions aren't getting called, and either call them or remove them. Plus it will increase the coverage score, so we don't have to check coverage of files, which have low coverage only because of validation functions.

@dkopecek
Copy link
Contributor Author

Looks good

spbnick added a commit that referenced this pull request Mar 14, 2016
CI: Enable coverage testing
@spbnick spbnick merged commit 492868d into Scribery:master Mar 14, 2016
@spbnick
Copy link
Member

spbnick commented Mar 14, 2016

Splendid :)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants