Test Compilation [was: Re: Kdevelop4 gsoc]

Vladimir Prus ghost at cs.msu.su
Sun May 11 14:08:53 UTC 2008


On Sunday 11 May 2008 16:29:40 Manuel Breugelmans wrote:
> On Sunday 11 May 2008 09:38:58 Andreas Pakulat wrote:
> > On 11.05.08 03:52:42, Aleix wrote:
> > > On 5/10/08, Andreas Pakulat <apaku at gmx.de> wrote:
> > > > On 06.05.08 21:41:12, Manuel Breugelmans wrote:
> > > >  > 2. How to compile the tests, what kind of user input is required
> > > >  > here?
> > > >  >
> > > >  > a/ just let the user wite his own build rules with system of choice
> > > >  > b/ automate it for cmake based projects? request only include dir's
> > > >  > and libraries/objects to link to.
> > > >  >
> > > >  > Option a is the easiest implementation wise but not so user
> > > >  > friendly. If this route is taken 1. is a non-issue ... Maybe support
> > > >  > this first and extend to b/ later.
> > > >
> > > > Both are needed IMHO. a) can be easy in larger projects such as KDE4
> > > >  which already have unit-tests and thus its basically just a one-liner
> > > > to add a new test. However if you're not in such a project it would be
> > > > nice to use the buildtools. Using the Buildsystem API you can even do
> > > > it easily for all buildsystems that kdevelop supports, because you can
> > > > just tell the buildsystem to add a new target item with a couple of
> > > > sources attached.
> > >
> > > Well, you already know how I feel about editing user scripts, I don't
> > > really think that messing with it is a good idea...
> >
> > Well, thats why I said both need to be there. People that generally use
> > the GUI for their buildsystem will use b), others that know their
> > buildsystem will use option a) anyway :)
> >
> > > But anyway, my point is that you shouldn't do it buildtool dependent,
> >
> > Exactly my point, use the API we already have:
> > BuildSystemManager::createTargetItem()
> 
> Probably concepts like 'test-build' and 'test-run' target are needed here, 
> next to the conventional build-run-debug. 

I am thinking that as far as launch framework is concerned, one should have,
in addition to standard "C++ application" launch configuration type, a special
"XXX unit test" launch configuration type. When that configuration is selected,
the "run" and "debug" commands will respectively run tests and run tests under
debugger. And yes, I do think the latter is useful, it's clearly useful in Eclipse.

- Volodya




More information about the KDevelop-devel mailing list