Skip to content

Adding coverage support for C code tests - #833

Merged
hugovk merged 1 commit into
python-pillow:masterfrom
wiredfool:lcov-rb
Aug 1, 2014
Merged

hugovk merged 1 commit into
python-pillow:masterfrom
wiredfool:lcov-rb

Conversation

@wiredfool

Copy link
Copy Markdown
Member

Or, moving the goalposts for #722.

Currently, we're at 78.85%, 7160 of 9081 lines covered.
With this patch, we're at 73.57%, 14400 of 19573 lines covered.

So, we lose percentage, but gain instrumentation of 10k lines of code.

It installs a couple of extra packages, including, horror of horrors, a ruby gem. Using the extra bits, it combines the output json from gcov/lcov's c coverage with the json from coveralls-python. Then, the upload.

The coveralls-merge package can be found in my repo: https://github.com/wiredfool/coveralls-merge

Output can be found here: https://coveralls.io/builds/1029743 , especially this file: https://coveralls.io/files/257210494

Performance ranges from not bad to a somewhat worse than just python coverage. We may want to consider covering 2.7+sitepackages, 3.4, and maybe one of the pypys, as that should get us accurate to within a few lines of coverage. (edit, according to my tests, those three (2.7+site, 3.4, pypy2.3) gets us +- 1 line of coverage compared to all 8 of them.)

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-5.01%) when pulling c216c6a on wiredfool:lcov-rb into 82bf25a on python-pillow:master.

@wiredfool

Copy link
Copy Markdown
Member Author

@hugovk You ok with this?

@hugovk

hugovk commented Aug 1, 2014

Copy link
Copy Markdown
Member

Yes, good stuff!

How does the timing differ covering those three versus the whole lot?

@wiredfool

Copy link
Copy Markdown
Member Author

These are the travis runs:

Full set, ~52 total minutes:
https://travis-ci.org/python-pillow/Pillow/builds/31363170

Just the three ~19 total minutes:
https://travis-ci.org/wiredfool/Pillow/builds/31378418
(note that this is just not running all of them, I'd run them without coverage. So it's not exactly fair.)

vs with Python coverage only ~46 minutes total:
https://travis-ci.org/python-pillow/Pillow/builds/31443000

Performance of individual runs seems similar for cpython, a little slower for pypy.

@hugovk

hugovk commented Aug 1, 2014

Copy link
Copy Markdown
Member

Individual jobs take between ~30 seconds and ~2 minutes longer, so the start-to-end time, given parallel jobs, won't be so much more.

Let's cover all for now, and can fine tune later as needed.

hugovk added a commit that referenced this pull request Aug 1, 2014
Adding coverage support for C code tests
@hugovk
hugovk merged commit 0404353 into python-pillow:master Aug 1, 2014
@hugovk hugovk mentioned this pull request Aug 4, 2014
@wiredfool
wiredfool deleted the lcov-rb branch September 23, 2014 16:21
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.

3 participants