Review Request 122206: [kio] Make tests optional

Albert Vaca Cintora albertvaka at gmail.com
Tue Mar 17 17:48:31 UTC 2015



> On March 16, 2015, 8:37 p.m., Albert Vaca Cintora wrote:
> > I know this is merged already but this patch is being applied to every KDE package and I want to keep the discussion in a single place.
> > 
> > We already have a toggle option in CMake that is "BUILD_TESTING". If Gentoo wants to not build the tests (I'm not judging if they should, let them be free to do it), they can just set BUILD_TESTING to OFF. I understand that CMake will still try to find Qt5Test and fail, but here is where I think we got it wrong:
> > 
> > This patch does the following:
> > if (Qt5Test is not found) 
> >     BUILD_TESTING = OFF
> > 
> > What I think this patch should be doing is this:
> > if (BUILD_TESTING == OFF) 
> >     Don't look for Qt5Test
> > 
> > Did I miss something or this seems more reasonable to you guys as well?
> 
> Michael Palimaka wrote:
>     One of the original versions of these test patches looked something like:
>     
>         if (BUILD_TESTING)
>             add_subdirectory(autotests)
>         endif ()
>         
>     with `find_package(Qt5Test)` inside the autotests directory. While this is used a bit in frameworks, it was rejected from a lot of plasma packages because it relies on a magic variable (although it is defined by ECM).
>     
>     As a result there's a whole range of approaches across frameworks/plasma/apps all doing the same thing. It would be nice if we could agree on something and be consistent.

Is that the reason why we are doing it this way? :/ I don't think this is a magic variable at all, and if you want it to be even less magic you can set it in advance in a line before the if.


- Albert


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


On Feb. 6, 2015, 4:14 p.m., Andreas Sturmlechner wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122206/
> -----------------------------------------------------------
> 
> (Updated Feb. 6, 2015, 4:14 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 c1ed03f6cac648517828aec60e896baf9fbcfd9d 
> 
> 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/20150317/ee738679/attachment.html>


More information about the Kde-frameworks-devel mailing list