D14958: Fix kdev_perforce unittest to run on kde windows CI and everywhere else.

Kevin Funk noreply at phabricator.kde.org
Tue Aug 21 12:03:25 BST 2018


kfunk requested changes to this revision.
kfunk added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> CMakeLists.txt:13
> +add_definitions( "-DP4_BINARY_DIR=\"${PROJECT_BINARY_DIR}\"")
> +add_definitions( "-DP4_CLIENT_STUB_EXE=\"p4clientstub${CMAKE_EXECUTABLE_SUFFIX}\"")
>  

With http://doc.qt.io/qt-5/qstandardpaths.html#findExecutable you wouldn't need to append `${CMAKE_EXECUTABLE_SUFFIX}`

> test_perforce.cpp:58
> +    /// During test we are setting the executable the plugin uses to our own stub
> +    QDirIterator it(P4_BINARY_DIR , QStringList() << P4_CLIENT_STUB_EXE, QDir::Files, QDirIterator::Subdirectories);
> +    QString p4stubPath;

Use `http://doc.qt.io/qt-5/qstandardpaths.html#findExecutable`? Also `QVERIFY(...)` that the executable was found maybe?

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D14958

To: volden, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180821/c8adfed8/attachment.html>


More information about the KDevelop-devel mailing list