kde4_add_test is not sufficient

David Faure faure at kde.org
Sat Jun 9 11:13:54 CEST 2007


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"...

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-buildsystem mailing list