kde4support: kstandarddirs_unittest fix
David Faure
faure at kde.org
Sat Dec 21 00:19:28 UTC 2013
On Friday 20 December 2013 23:07:08 Alex Merry wrote:
> In my continuing mission to make the frameworks green on Jenkins:
>
> This makes the tests work even when not installed, even when kde4support
> is installed to a separate prefix to the rest of frameworks (as it is on
> Jenkins -- although this setup is dangerous for *real* users of
> KStandardDirs).
Oh wow. I didn't see this mail before I started to make (and push) my own
fixes for this. Sorry for the conflicts.
Your patch is more intrusive than I thought it would be. Why change everything
in e.g. testFindResource() or testFindDirs() when they pass just fine on
build.kde.org?
> The one bit that is still failing is testSetXdgDataDirs() and
> testRestrictedResources(), which both fail for the same reason.
>
> Basically, the test checks that
> CMAKE_INSTALL_PREFIX "/share/applications/"
> is in the xdgdata-apps resource. However, KStandardDirs puts
> CMAKE_INSTALL_PREFIX "/share/applications/kde5/"
> in the xdgdata-apps resource.
>
> Which is right: the test or KStandardDirs?
installDir("xdgdata-apps") is share/applications/kde5 (so that .desktop files
of kde apps get there), but surely we expect share/applications to be in the
list of directories returned by xdgdata-apps (so we can find non-kde apps
too).
Not sure yet why this isn't work out (I tried unsetting XDG_DATA_DIRS, given
the code in kstandarddirs.cpp, but no go).
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
More information about the Kde-frameworks-devel
mailing list