[autotests] Support new way to run the tests without need to install
ClosedPublic

Authored by graesslin on Aug 25 2017, 4:22 PM.

Details

Summary

KWin was quite good in ensuring that you don't need to install by
passing paths to the tests. The new way is much nicer, so code is
adjusted for the new way. Also if we require a newer ECM in future we
need to support the new way.

No guarantee that the tests don't pick something up from the system env,
that needs more testing. Also I couldn't verify all tests, for unknown
reasons my system refuses to run any OpenGL tests (that issue was already
present before).

References: https://community.kde.org/Guidelines_and_HOWTOs/Making_apps_run_uninstalled

Test Plan

The tests which loaded helpers pass

Diff Detail

Repository
R108 KWin
Branch
autotests-ecm-in-dir
Lint
No Linters Available
Unit
No Unit Test Coverage
graesslin created this revision.Aug 25 2017, 4:22 PM
Restricted Application added a project: KWin. · View Herald TranscriptAug 25 2017, 4:22 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
graesslin planned changes to this revision.Aug 25 2017, 7:03 PM

I figured out why my GL tests are failing: it's XWayland not starting, so totally unrelated. If I use a vgem device the XWayland starts.

autotests/integration/kwin_wayland_test.h
177

That one doesn't work yet. It gives the wrong path, so system installed is picked.

graesslin updated this revision to Diff 18787.Aug 26 2017, 6:19 AM

Made QT_QPA_PLATFORM_PLUGIN_PATH work, verified with strace that correct plugin gets loaded

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptAug 26 2017, 6:19 AM
graesslin updated this revision to Diff 18790.Aug 26 2017, 7:30 AM
  • changed add_test to newer syntax so that tests are found after a clean build
  • kglobalaccel still loads wrong plugin (might need fixing in kglobalaccel)
Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptAug 26 2017, 7:30 AM
graesslin updated this revision to Diff 18794.Aug 26 2017, 8:37 AM
  • Adjusted library path so that tests prefer what is in build dir
  • set LIBRARY_OUTPUT_DIRECTORY for globalaccel and aurorae, so that they are picked from bin dir
  • Verified both with strace
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptAug 26 2017, 8:37 AM
davidedmundson accepted this revision.Nov 15 2017, 8:04 PM
This revision is now accepted and ready to land.Nov 15 2017, 8:04 PM
This revision was automatically updated to reflect the committed changes.