Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c36f9d29 authored by Martin Flöser's avatar Martin Flöser

Fix test of scriptedeffectsloader when run from build directory without install

Summary:
On build.kde.org all tests loading scripted effects are failing. This
seems to be because the effects are not installed.

To make this work, this change introduces the following changes:
 * scripted effects are copied to ${build}/bin, like all binaries
 * the test sets XDG_DATA_DIRS env variable to point to ${build}/bin

This change also needs to be added to further tests once this is
accepted. Furthermore it could be considered whether KPackageLoader
should consider the QCoreApplication::applicationDirPath in addition to
the GenericDataLocation. This would make KPackageLoader work much better
in a build tree only setup.

Test Plan: Test passes locally, obviously not tried on build.kde.org

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16682
parent a04b9da6
......@@ -91,6 +91,7 @@ private Q_SLOTS:
void TestScriptedEffectLoader::initTestCase()
{
qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8());
auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
QCoreApplication::instance()->setProperty("config", QVariant::fromValue(config));
}
......
......@@ -4,3 +4,5 @@ install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effe
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_dialogparent.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_dialogparent)
......@@ -4,3 +4,5 @@ install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effe
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_eyeonscreen.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_eyeonscreen)
......@@ -4,3 +4,5 @@ install(DIRECTORY package/
install(FILES package/metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_fade.desktop)
file(COPY package/ DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_fade)
......@@ -4,3 +4,5 @@ install(DIRECTORY package/
install(FILES package/metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_fadedesktop.desktop)
file(COPY package/ DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_fadedesktop)
......@@ -4,3 +4,5 @@ install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effe
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_frozenapp.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_frozenapp)
......@@ -4,3 +4,5 @@ install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effe
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_login.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_login)
......@@ -4,3 +4,5 @@ install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effe
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_logout.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_logout)
......@@ -4,3 +4,5 @@ install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effe
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_maximize.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_maximize)
......@@ -7,3 +7,5 @@ install(FILES metadata.desktop
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_scale.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_scale)
......@@ -7,3 +7,5 @@ install(FILES metadata.desktop
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_squash.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_squash)
......@@ -4,3 +4,5 @@ install(FILES metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effe
install(FILES metadata.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME}
RENAME kwin4_effect_translucency.desktop)
file(COPY contents metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_translucency)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment