Code coverage in Phobos

Seb via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 29 13:50:57 PDT 2016


On Monday, 28 March 2016 at 11:29:55 UTC, Vladimir Panteleev 
wrote:
> On Monday, 28 March 2016 at 01:30:34 UTC, Seb wrote:
>> AFAIK dmd supports the `-cov` flag since quite some time, so I 
>> would be interested why there's no code coverage bot. There 
>> also seems to exist at least two external platforms that allow 
>> such code coverage analyzing [1, 2]. Is this already on your 
>> roadmap?
>>
>> [1] https://github.com/codecov/example-d
>> [2] https://github.com/ColdenCullen/doveralls/issues/16
>>
>> Anyways it seems pretty easy to hack something quick&dirty 
>> together that could be pretty helpful:
>
> Yep. The difficulties are:
>
> 1. Getting data off the autotester. Currently it's nearly 
> impossible, as is making any changes to it.
>
> https://issues.dlang.org/show_bug.cgi?id=14381
>
> 2. Collating data from multiple platforms, as there is a lot of 
> platform-specific code in e.g. std.stdio, std.file, and most of 
> Druntime.

Okay I see that for the long run we need a better way to handle 
the testing infrastructure :/

Can't we focus for the near future on getting a simple Phobos 
coverage tester that just compares the coverage of all files 
changes like your DAutoTest?
With this approach we can still prevent regression and show 
improvements.


More information about the Digitalmars-d mailing list