[extra-cmake-modules] modules: Revert "use the NAME_PREFIX only for the test, not for the executable"
Alex Merry
alex.merry at kde.org
Mon May 12 12:27:21 UTC 2014
On 12/05/14 09:02, David Faure wrote:
> On Sunday 11 May 2014 19:37:05 Saro Engels wrote:
>> 1) are prefixes needed anywhere? They seem to be not needed because I
>> have seen only one repo (kio) where more than one prefix is used at all.
>> 2) however the answer to q.1 might be, it would be useful for windows
>> to have all frameworks with the same code, e.g. ecm_add_test for
>> single tests, ecm_add_tests for multiple tests.
>> If somebody knows places where this isn't the case (e.g. ecm_add_test
>> in an additional macro, I would like to here about it so I can fix it).
>
> I added the prefixes in the testnames back when everything was in kdelibs, to
> make it easier to find where a failing test came from.
> Otherwise you'd see, in the make test output, something like
> modeltest ... FAILED
> and you'd have no idea where to look for it.
>
> Now that the frameworks are splitted, I suppose we could remove them all --
> but ECM should still provide support for them IMHO, for bigger repositories
> like, say, calligra. And what better way to provide something that works than
> to use it ourselves ;)
Well, we could use them in places where we currently have multiple
prefixes, like kio, although it's still not *that* useful there, since
all the tests are in the same directory.
> But other than that, I don't mind if the prefixes get removed from the
> frameworks's tests.
>
> In any case, I didn't expect the executable name to be called e.g.
> xmlgui-kxmlgui_unittest. That is quite odd and unexpected.
I agree that it's weird and unnecessary in the frameworks, but that can
be solved by removing the NAME_PREFIX argument.
For the macro, though, the question is what is the purpose of the
prefix? Is it just to make things easier for humans reading the output
of "make test", or should it provide actual namespacing (so that tests
don't actually tread on each other's toes in large codebases). And if we
think of something like KIO's "globaltest", having the executable
kiocore-globaltest isn't odd, and it seems reasonable that multiple code
sections in large codebases might want tests named "globaltest".
Alex
More information about the Kde-buildsystem
mailing list