Copy PlasmaCore binary qmldir file structure into bin for unit testsThis way tests pass before installation.
ClosedPublic

Authored by davidedmundson on Aug 11 2018, 1:01 PM.

Details

Test Plan

Before patch

Created a broken env by unsetting QML2_IMPORT_PATH
Ran test. It failed

It passes.

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Aug 11 2018, 1:01 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 11 2018, 1:01 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Aug 11 2018, 1:01 PM
davidedmundson retitled this revision from Copy PlasmaCore binary qmldir file structure into bin for unit tests This way tests pass before installation. to Copy PlasmaCore binary qmldir file structure into bin for unit testsThis way tests pass before installation..Aug 11 2018, 1:02 PM
davidedmundson added a reviewer: dfaure.
dfaure requested changes to this revision.Aug 11 2018, 1:12 PM
dfaure added inline comments.
src/declarativeimports/core/CMakeLists.txt
74

But that requires "make install", doesn't it?
The CI won't do that.

See kirigami, kservice or today's akademy presentation for the cmake commands to copy this at build time rather than at install time.

This revision now requires changes to proceed.Aug 11 2018, 1:12 PM

Copy at build time

dfaure requested changes to this revision.Aug 12 2018, 9:45 AM
dfaure added inline comments.
src/declarativeimports/core/CMakeLists.txt
80

The filename won't work on Windows. Here's more portable syntax:

add_custom_command(TARGET copy POST_BUILD
                    COMMAND ${CMAKE_COMMAND} -E
                    copy $<TARGET_FILE:corebindingsplugin> ${CMAKE_BINARY_DIR}/bin/org/kde/plasma/core/)
This revision now requires changes to proceed.Aug 12 2018, 9:45 AM
davidedmundson marked 2 inline comments as done.Aug 12 2018, 2:51 PM
dfaure accepted this revision.Aug 13 2018, 8:40 PM
This revision is now accepted and ready to land.Aug 13 2018, 8:40 PM
This revision was automatically updated to reflect the committed changes.

We went from 7 failing unit tests on CI to......6!

Progress, but not done.