Review Request 114698: Make KStandardDirsTest work when not installed or KDEDIRS not set correctly

Alex Merry kde at randomguy3.me.uk
Sat Dec 28 12:48:00 UTC 2013


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

(Updated Dec. 28, 2013, 12:48 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Frameworks and David Faure.


Repository: kde4support


Description
-------

Prevent KStandardDirsTest::testThreads producing multiple results

testThreads() calls several other tests, some of which can call QSKIP.
This means that one test can produce several SKIPs, which doesn't make
much sense.  So, instead, we check the SKIP conditions in testThreads()
itself.

Remove duplicate test code

These lines exist in another test

Use data directories we install ourselves in kstandarddirs_unittests

That way, we know they will be there, even when KDEDIRS is not set
correctly or another framework changes the data files it installs.

Skip tests requiring KConfig if KDEDIRS is not set correctly

If frameworks are installed to different locations, KDEDIRS needs to be
set appropriately for KStandardDirs to work.  kstandarddirs_unittest now
checks for this, and skips the relevant tests with a helpful message if
KDEDIRS is not set properly.

Skip tests that require kde4support to be installed if it is not

Various KStandardDirs tests depend on kde4support being installed (since
KStandardDirs is supposed to find installed things), so we cannot
sensibly run them if kde4support has not been installed yet.


Diffs
-----

  autotests/kstandarddirstest.h fb1058d9a9e7440a8aa012ed0da86f40ae3ad01e 
  autotests/kstandarddirstest.cpp 5e0151b1cf7afe344d5339031bca77405ebeb3a5 
  src/CMakeLists.txt 1529d0a33d9b80a6e5f937783ee7b8a0145d284a 
  src/config-kstandarddirs.h.cmake 40994a9af1675af2a0edb89cdd95352e84227f73 

Diff: https://git.reviewboard.kde.org/r/114698/diff/


Testing
-------

Tests pass (or at least skip with a helpful message) when kde4support is not installed, or installed to its own prefix with KDEDIRS set or unset (or set to only include the kde4support directory, or only the rest of the frameworks).  Also still pass when kde4support is installed to the same prefix as the other frameworks.


Thanks,

Alex Merry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131228/db650ac1/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list