kde4_add_test is not sufficient

Andreas Pakulat apaku at gmx.de
Fri Jun 15 02:59:52 CEST 2007


On 09.06.07 11:13:54, David Faure wrote:
> On Friday 08 June 2007, Thiago Macieira wrote:
> > 
> > Andreas Pakulat said:
> > > On 08.06.07 00:34:17, Alexander Neundorf wrote:
> > >> Not sure we need this. If it just adds add_test() to
> > >> kde4_add_test_executable() it might more confuse than help.
> > >
> > > Well, kde4_add_unit_test is simply just a little convenience macro to
> > > not having to remember to use both kde4_add_test_executable and
> > > add_test.
> > 
> > I'd say that kde4_add_test should do what the name says: add_test. We can
> > have another macro to create and build executables that aren't unit tests.
> > 
> > I argue for that because we want people to create unit tests whenever
> > possible. As such, the short name should belong to the most common action.
> > The longer name can be used for the exceptions.
> 
> We need unit tests and we need example programs, there is no "common" and "exception" in there.
> 
> kde4_add_test_executable and kde4_add_unit_test seem nice to me - both high-level enough so that
> you only have to call one of them, depending on whether something is a unit test or an example program.
> 
> If we call the first macro something that doesn't include "test" (like kde4_add_example_executable),
> then it will get confusing, because this macros means "build this if KDE4_BUILD_TESTS is set"...

So I'll do the rename during the weekend (all of trunk/KDE), as the
KProcess-Stuff is sorted out for kdelibs already. That is wherever
currently kde4_add_test() and add_test() are used it gets kde4_add_unit_test.
Wherever kde4_add_test is used without add_test() it gets
kde4_add_test_executable. 

Objections?

Andreas

-- 
Your reasoning powers are good, and you are a fairly good planner.


More information about the Kde-buildsystem mailing list