FYI: Updates in ThreadWeaver

David Faure faure+bluesystems at kde.org
Thu Apr 4 17:05:29 UTC 2013


On Thursday 04 April 2013 18:31:53 Alexander Neundorf wrote:
> On Thursday 04 April 2013, Volker Krause wrote:
> > On Wednesday 03 April 2013 10:09:56 Mirko Boehm wrote:
> > > On 04/02/2013 05:05 PM, Sebastian Kügler wrote:
> > > >> - - Examples are currently in the kdelibs tree, at
> > > >> 
> > > >> > tier1/threadweaver/examples. I like that they are in the same
> > > >> > repository, but still - is this the right place?
> > > > 
> > > > If not, we have the kdeexamples repository for such things.
> > > 
> > > Two more questions:
> > > 
> > > - - I have some code that should only be compiled for debug builds.
> > > Which
> > > is the preferred macro to do that? At the moment, I am using the
> > > classical NDEBUG, which probably is not what we are using:
> > > 
> > > #if not defined NDEBUG
> > > 
> > >     d->debugExecuteWrapper.wrap(setExecutor(&d->debugExecuteWrapper));
> > > 
> > > #endif
> > > 
> > > - - As for tests, I now have four unit tests programs amounting to ~40
> > > tests total. One of them has 28 of the tests. I wonder if I should
> > > simply put all the tests into one unit test binary, or not. Note that
> > > this does not include benchmarks, those are separate. What is the
> > > preferred way?
> > 
> > CTest can execute unit tests in parallel, so there is an advantage of
> > having multiple test executables, assuming enough tests for this to matter
> > of course.
> 
> I haven't looked at the test...
> 
> When you say "One of them has 28 of the tests.", does this mean that one
> execution of the test executable executes 28 tests, or can the test
> executable be called with 28 different command line parameters, and then
> execute the requested test ?
> In the second case, this sounds good, a test failure is very specific and
> tests can be executed in parallel, which is not the case if the first is the
> case.

IMHO we're nitpicking, here.

A qtestlib-based test with 28 test methods in one class is just fine, in case 
of failure we can see exactly which test method failed. This is definitely not 
a reason for split up.

And for parallelism (which we don't use yet) there are other test executables 
to run, already, even in threadweaver.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by BlueSystems and KDAB to work on KDE Frameworks



More information about the Kde-frameworks-devel mailing list