[TIP] coverage combine with the results of a jenkins matrix job...
chris at simplistix.co.uk
Thu Feb 14 15:25:34 PST 2013
(copying the list, since I think this may be of wider interest)
Okay, I think I'm part of the way there, but still confused, hopefully
you can help...
So, the runs generating the .coverage files are in this matrix:
Here's an example output:
The actual command being run is:
bin/nosetests --with-xunit --with-cov --cov=testfixtures
So, now I have a downstream job where I want to combine all those
.coverage files and generate html and xml reports. Here's the workspace
for that job:
So, each PYTHON* has a .coverage file in it, testfixtures-3.0.0dev
contains the source.
I thought it would just be a case of:
coverage combine PYTHON*/.coverage
But combine doesn't appear to work as I expect. In fact, I don't think I
have a clue how it's supposed to work, so thought I'd ask ;-)
What should I be looking to do? I have a feeling I'll need a [path]
section in it, but no idea what I should put there...
Any help very gratefully received!
On 13/02/2013 16:21, Ned Batchelder wrote:
> Sorry, I'm not well-versed enough with Jenkins to know.
> On 2/13/2013 10:57 AM, Chris Withers wrote:
>> Hmm, any idea how to do that in a Jenkins matrix job?
>> On 13/02/2013 15:52, Ned Batchelder wrote:
>>> I would run coverage twice: for Python 2, and again for Python 3, and
>>> then I would combine the results (coverage combine).
>>> On 2/13/2013 10:36 AM, Chris Withers wrote:
>>>> One question: if I have code paths that should not be covered under a
>>>> particular version of python, but should under others, how can I go
>>>> about dealing with that?
>>>> if PY3:
>>>> both of those branches should be covered in different test runs, but
>>>> neither of them will be covered in a single run.
>>>> How would you tackle this to give meaningful output?
Simplistix - Content Management, Batch Processing & Python Consulting
More information about the testing-in-python