[phobos] Time taken for running unit tests

Jonathan M Davis jmdavisProg at gmx.com
Mon Sep 26 18:05:46 PDT 2011


On Monday, September 26, 2011 17:46:31 Andrei Alexandrescu wrote:
> On 9/26/11 2:37 AM, Don Clugston wrote:
> > I think we need to have a strategy for managing the amount of time
> > required for running the unittests. Currently, on Windows, the time
> > for all compiler tests + phobos tests is one hour. (The druntime tests
> > are only 30 seconds).
> > By contrast, running all compiler tests + phobos tests on D1, takes
> > about four minutes.
> 
> [snip]
> 
> Breaking the tests into two categories would work, but would entail a
> lot of work and further effort (making a decision for each new unittest).
> 
> A better solution (that's been mentioned already) would be to do for
> Windows what we already do for Unix - each module's unittest defines a
> separate binary, linked with the regular (non-unittest) library. Then
> whenever you work on a module you can unittest only that one.

This would definitely improve the Windows build, but I would suggest that both 
the Windows and Linux builds have a separate target which builds and runs all 
of the modules' unit tests at once in order to catch circular dependencies 
caused by static constructors. Obviously, both the Posix and Windows makefiles 
would need to be adjusted in order for that to work.

Also, the fact that dmd is having the issues that its having compiling Phobos' 
unit tests really should be addressed unless there's something intrinsic to 
the problem which makes it essentially unsolvable. dmd needs to be able to 
build large projects, and the fact that it's having the trouble that it's 
having right now does not bode well for large projects.

- Jonathan M Davis


More information about the phobos mailing list