View mode: basic / threaded / horizontal-split · Log in · Help
May 10, 2012
Re: Specifying which Phobos modules to unittest
On Thu, May 10, 2012 at 07:05:27PM +0200, Christian Köstlin wrote:
> On 05/10/2012 06:21 PM, Joseph Rushton Wakeling wrote:
> >Hello all,
> >
> >Is there any way to specify individual Phobos modules to unittest when
> >building, instead of having to do the whole lot?
> >
> >When working on 1 single module, it'd be nice to be able to unittest
> >that one alone and not have to worry about doing the complete set of
> >tests until ready to push back to GitHub.
> >
> >Can anyone advise?
> >
> >Thanks & best wishes,
> >
> >-- Joe
> the tests are not executed at compile time but instead at runtime
> before main(). so you have to compile the modules seperately, and
> only the modules you want to test with the unittest flag.
[...]

This is not true of Phobos; the Phobos makefile has a separate rule for
building (and running) unittests. The OP's question is, how to make this
run only a single module's tests as opposed to the entire Phobos (which
takes a while, since some of the tests are quite extensive).


T

-- 
Chance favours the prepared mind. -- Louis Pasteur
May 10, 2012
Re: Specifying which Phobos modules to unittest
sorry ... i did not get this, as i never have developed phobos.
May 10, 2012
Re: Specifying which Phobos modules to unittest
On Thursday, May 10, 2012 10:14:12 H. S. Teoh wrote:
> On Thu, May 10, 2012 at 07:05:27PM +0200, Christian Köstlin wrote:
> > On 05/10/2012 06:21 PM, Joseph Rushton Wakeling wrote:
> > >Hello all,
> > >
> > >Is there any way to specify individual Phobos modules to unittest when
> > >building, instead of having to do the whole lot?
> > >
> > >When working on 1 single module, it'd be nice to be able to unittest
> > >that one alone and not have to worry about doing the complete set of
> > >tests until ready to push back to GitHub.
> > >
> > >Can anyone advise?
> > >
> > >Thanks & best wishes,
> > >
> > >-- Joe
> > 
> > the tests are not executed at compile time but instead at runtime
> > before main(). so you have to compile the modules seperately, and
> > only the modules you want to test with the unittest flag.
> 
> [...]
> 
> This is not true of Phobos; the Phobos makefile has a separate rule for
> building (and running) unittests. The OP's question is, how to make this
> run only a single module's tests as opposed to the entire Phobos (which
> takes a while, since some of the tests are quite extensive).

I believe that it's possible. I think that Andrei does it (he posted commands 
related to that at one point, but I couldn't get them to work), but I don't 
know how. I just always run the whole test suite. This is a question that 
would probably be better asked on either the main list or the Phobos list, 
since the ones most likely to know are Phobos devs, and a number of them do 
not pay attention to D.Learn.

- Jonathan M Davis
Top | Discussion index | About this forum | D home