Fix test of scriptedeffectsloader when run from build directory without install
ClosedPublic

Authored by graesslin on Nov 5 2018, 1:12 PM.

Details

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

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Nov 5 2018, 1:12 PM
Restricted Application added a project: KWin. · View Herald TranscriptNov 5 2018, 1:12 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Nov 5 2018, 1:12 PM
zzag accepted this revision.Nov 5 2018, 2:35 PM
zzag added a subscriber: zzag.

I wrecked my local installation, testScriptedEffectLoaded is now passes without running make install.

Could we maybe btw introduce add_scripted_effect function or something like that so we don't have to duplicate

install(...)
install(...)
install(...)
file(...)

?

This revision is now accepted and ready to land.Nov 5 2018, 2:35 PM
In D16682#354502, @zzag wrote:

I wrecked my local installation, testScriptedEffectLoaded is now passes without running make install.

Could we maybe btw introduce add_scripted_effect function or something like that so we don't have to duplicate

install(...)
install(...)
install(...)
file(...)

?

Yep, makes sense to have a shortcut for it.

This revision was automatically updated to reflect the committed changes.