Parallel execution of unittests

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Thu May 1 02:38:51 PDT 2014


On Thursday, 1 May 2014 at 08:51:47 UTC, Johannes Pfau wrote:
> Am Wed, 30 Apr 2014 22:19:24 +0200
> schrieb Jacob Carlborg <doob at me.com>:
>
>> __traits(getUnitTests)
>
> I've always wondered, but never asked: Doesn't 
> __traits(getUnitTests)
> usage suffer from the same problem std.benchmark had?
>
> That in order to make it work for all modules you
> a) have to explicitly mention every module
> b) use module constructors, leading to module constructor 
> dependency
>    hell (afaik the main reason we don't have a std.benchmark 
> now)
> ?

You only need to make sure all modules are transitively imported
from initial one. Everything else can be done via recursive
reflection with __traits(allMembers), module constructors are not
needed either.

One can also generate special test entry module that imports all
project modules using build system help.


More information about the Digitalmars-d mailing list