[Differential] [Request, 29 lines] D2431: Fix running isolated tests on a clean build
nalvarez (Nicolás Alvarez)
noreply at phabricator.kde.org
Sat Aug 13 05:50:21 BST 2016
nalvarez created this revision.
nalvarez set the repository for this revision to rAKONADI Akonadi .
nalvarez added a project: KDE PIM.
Restricted Application added a subscriber: kde-pim.
REVISION SUMMARY
The `add_akonadi_isolated_test` CMake macro was searching for `akonaditest` using `find_program`. This is the right thing to do when the macro is called by a separate project that uses akonadi, since then it is already in the system as a required dependency.
However, this will not work when building akonadi itself for the first time, where akonadi is not installed in the system yet. `akonaditest` will not be found, since it will be built and installed by //this same project//, and that's at `make` time, long after this macro runs.
This patch checks if we're building akonadi itself, and if so, it sets the test runner as just `"akonaditest"`. When using the `add_test(NAME foo COMMAND akonaditest)` syntax, CMake will detect that it's a target name and replace it with the location of the executable that //will// be built.
TEST PLAN
I only tried building and testing Akonadi itself, in a very clean environment. It's still necessary to test if I didn't break building (and running tests in) other projects that depend on Akonadi, and if the warning is printed properly if `akonaditest` is missing.
REPOSITORY
rAKONADI Akonadi
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D2431
AFFECTED FILES
KF5AkonadiMacros.cmake
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: nalvarez
Cc: kde-pim, spencerb, dvasin, winterz, smartins, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20160813/c60cb850/attachment.html>
More information about the kde-pim
mailing list