Unset all env variables related to KDE session in integration tests
Summary: When running ctest in my session a few OpenGL/waylandonly tests crashed on tear down. This does neither happen on build.kde.org nor when running ctest in a tty. Comparing the env variables of tty and session pointed to the session variables. Unsetting those makes the test not crash. This makes sense as e.g. plasma-integration no longer gets loaded. As our test suite is intended to test KWin and not plasma-integration or gnome integration we should have a clean and reproducable environment, so the variables are unset. Test Plan: 100% tests passed, 0 tests failed out of 130 Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16939
This commit is contained in:
parent
260646ed62
commit
98ddb93dfe
1 changed files with 4 additions and 0 deletions
|
@ -193,6 +193,10 @@ int main(int argc, char *argv[]) \
|
|||
setenv("QT_QPA_PLATFORM", "wayland-org.kde.kwin.qpa", true); \
|
||||
setenv("QT_QPA_PLATFORM_PLUGIN_PATH", QFileInfo(QString::fromLocal8Bit(argv[0])).absolutePath().toLocal8Bit().constData(), true); \
|
||||
setenv("KWIN_FORCE_OWN_QPA", "1", true); \
|
||||
qunsetenv("KDE_FULL_SESSION"); \
|
||||
qunsetenv("KDE_SESSION_VERSION"); \
|
||||
qunsetenv("XDG_SESSION_DESKTOP"); \
|
||||
qunsetenv("XDG_CURRENT_DESKTOP"); \
|
||||
DPI; \
|
||||
KWin::WaylandTestApplication app(OperationMode, argc, argv); \
|
||||
app.setAttribute(Qt::AA_Use96Dpi, true); \
|
||||
|
|
Loading…
Reference in a new issue