[phobos] parallel unit testing

Brad Roberts braddr at puremagic.com
Fri Jul 15 15:47:13 PDT 2011


I'd like to take advantage of having multi-cores on both my primary 
development machine and all except one of the auto-testers.  One of the 
problems with doing that is that several of the unit tests use hard coded 
filenames (one example, grep for "deleteme").  I'm pretty sure there are 
others.

Could I ask for volunteer(s) to

  1) examine phobos for these sorts of problems and fix them

  2) start testing with -j# where # is greater than 1

NOTE: just switching to random filename generation only reduces the 
statistical rate of failure.  The right answer is to use either mkstemp or 
tmpfile (or, sigh, a rewrite of them in D if you alergic to using libc).  
Keep in mind that unit tests are also a form of best practice 
documentation.

DMD and Druntime are both in good shape when it comes to both building and 
running the tests in parallel.  The phobos build logic appears to be 
solid enough to survive parallel building, though I haven't been doing 
parallel builds of it until today.  It's just phobos's tests that are at 
issue, and even there only if the tests happen to run at the same time.

I really don't want to add additional intermitent test failures to the 
system, we've got enough of those already.

Thoughts?

Thanks,
Brad



More information about the phobos mailing list