[phobos] parallel unit testing

Don Clugston dclugston at googlemail.com
Wed Jul 20 16:15:01 PDT 2011


On 16 July 2011 00:47, Brad Roberts <braddr at puremagic.com> wrote:
> 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.

Some of the filename tests have other problems as well. Some of them
don't work on Windows. I replaced a couple of them with pragma(msg) in
the distant past, just to get the unit tests passing again (grep for
"broken test").


>
> 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
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>


More information about the phobos mailing list