Review Request 122206: [kio] Make tests optional

Andreas Sturmlechner andreas.sturmlechner at gmail.com
Tue Feb 3 20:59:41 UTC 2015



> On Feb. 1, 2015, 2:33 p.m., David Faure wrote:
> > Let me get this straight.
> > 
> > This patch makes the option BUILD_TESTING work, i.e. skip testing if not set.
> > 
> > The solution that was committed to kwin, *additionally* sets BUILD_TESTING to false if Qt5Test isn't available. This doesn't prevent setting the option to false manually if someone has Qt5Test but doesn't want to build the tests.
> > 
> > Is this an accurate description of the issue?
> > 
> > I would add that, IMHO, all frameworks should handle this the same way.
> > 
> > I had a further look and they currently don't.
> > * kservice, kimageformats, ktexteditor... do it like this patch (manual option).
> > * kcoreaddons, karchive... don't have the option, they just skip autotests if Qt5Test is not found.
> > * ki18n, kguiaddons, kdbusaddons, threadweaver compile autotests unconditionally.
> > 
> > I'm confused - how did anyone without Qt5Test make it all the way to kio, which depends on kdbusaddons and ki18n, then?
> > 
> > Unless I missed something, I would say that by default tests should be compiled if Qt5Test is present (developers) and should not be compiled if Qt5Test is absent or if it is explicitly desired not to build tests (packagers).
> > 
> > Therefore:
> > 1) doing both steps is good (i.e. doing like kwin).
> > 2) it should be done in all frameworks (that have autotests, which is most of them)
> > Anyone up to the task?

I guess what I was really trying to do initially - besides changing as little as possible - was mimicking the existing behaviour as much as possible. That means bailing out when Qt5Test is not found even though BUILD_TESTING was requested, so the user is informed about a dependency problem. The kwin solution will silently not build the tests, as far as I see it. If this is fine from a developer/packager point of view, I have a new patch for kio ready that goes the kwin way.

@David, why it was discovered in kio, that's easy, you do some packaging for fun and get told your submission should not hard-depend on Qt5Test, then you uninstall that to look for any fallout and kio happens to be one of the next few packages to receive new commits, thus rebuild fails (because the existing test-removing automagic did not work).


- Andreas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122206/#review75140
-----------------------------------------------------------


On Jan. 22, 2015, 7:48 p.m., Andreas Sturmlechner wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122206/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2015, 7:48 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> [kio] Make tests optional
> This is a small patch to CMakeLists.txt to only depend on Qt5Test if BUILD_TESTING.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 7fe0be5d4b2d7d9475a7844b4f8d93fc2f0a00c3 
> 
> Diff: https://git.reviewboard.kde.org/r/122206/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andreas Sturmlechner
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150203/75f971f1/attachment.html>


More information about the Kde-frameworks-devel mailing list