[TIP] Coverage combine with parallel mode

christian.staffa at gmx.de christian.staffa at gmx.de
Mon Nov 11 09:04:47 PST 2013


+1 for that (-;

©´¨)
 ¸.·´¸.·*´¨).¸.·*¨)
(¸.·´.(¸.·` ¤chris¤

~#sent by iphone#~

On 10.11.2013, at 23:29, Ned Batchelder <ned at nedbatchelder.com> wrote:

> You make some good points.  I've made a ticket to keep track of the proposal: https://bitbucket.org/ned/coveragepy/issue/277/combined-parallel-report-should-use
> 
> --Ned.
> 
> On 11/10/13 6:52 AM, christian.staffa at gmx.de wrote:
>> Hi Ned
>> 
>> Thanks for your answer (-;
>> 
>> Well I understand that for the XML report. And for this it is probably a good point with abspaths to process them further like in jenkins. But in the HTML report it does not make much sense with the path prefix where the project is located, right?
>> 
>> Say you want to produce a coverage report on different platfoms, as you commented that in the config file:
>> On linux /abspath/to/project and on windows c:\abspath\to\project and the combine command remaps that to /abspath/to/project.
>> 
>> Why not get rid of /abspath/to/project because it bloats the report with information that is not necessary for the report and make the file path longer than it need be for the user. The report will be better to read and looks more compact.
>> 
>> Comment? (;
>> 
>> Regards
>> 
>> ©´¨)
>>  ¸.·´¸.·*´¨).¸.·*¨)
>> (¸.·´.(¸.·` ¤chris¤
>> 
>> ~#sent by iphone#~
>> 
>> On 09.11.2013, at 02:06, Ned Batchelder <ned at nedbatchelder.com> wrote:
>> 
>>> On 11/7/13 6:47 AM, christian.staffa at gmx.de wrote:
>>>> Hi all :)
>>>> 
>>>> I am a little confused and hope anyone on this list can help me...
>>>> 
>>>> What is the aim:
>>>> I will produce a coverage report with the coverage.py tool written by Ned Batchelder. The report should display the __relative__ pathes to the sources of the project like
>>>>   dir/to/source.
>>>> 
>>>> Whats the problem:
>>>> The coverage is produced with the tool in parallel-mode due to the subprocess problem. The collecting of data is happen in the directory
>>>>   /abspath/to/project/.
>>>> 
>>>> In the end of the measurement process all coverage data files (.coverage.xyz) are copied to a directory
>>>>   /combine/dir
>>>> on the same machine.
>>>> The coverage combine command is invoked to produce the report with the --rcfile=coveragerc option. The coveragerc contains a path section like
>>>>   [paths]
>>>>   source =
>>>>       /../../abspath/to/project/
>>>>       /abspath/to/project
>>>> BUT after the combine step the report is displaying the
>>>>   /abspath/to/project/dir/to/source
>>>> and not
>>>>   dir/to/source
>>>> as intended.
>>>> 
>>>> Is there a possibility with the path section of the configuration file to get rid of the absolute path prefixes generated in the report (/abspath/to/project)?
>>>> Did i write the pathes section wrong for the combine step?
>>>> 
>>>> Thanks for any help and clarify that :)
>>> Hi Christian,
>>> 
>>> When the paths are remapped through the [paths] aliases, they result in absolute paths, based on the first entry in the [paths] section. I see your point though, relative might make more sense.  But for example, the XML report wants to have actual file paths so that the source can be found when displaying in Jenkins.
>>> 
>>> Can you say more about why the full path is objectionable?
>>> 
>>> --Ned.
>>> 
>>>> ©´¨)
>>>>  ¸.·´¸.·*´¨).¸.·*¨)
>>>> (¸.·´.(¸.·` ¤chris¤
>>>> 
>>>> ~#sent by iphone#~
>>>> _______________________________________________
>>>> testing-in-python mailing list
>>>> testing-in-python at lists.idyll.org
>>>> http://lists.idyll.org/listinfo/testing-in-python
> 



More information about the testing-in-python mailing list