Set temporary XDG_RUNTIME_DIR for more tests

Some tests were left out when we switched to using a temporary XDG_RUNTIME_DIR.

Fixes: QTBUG-79652
Change-Id: I8208d63f3f6a937406d25b1a8cf3f5b0be04bc73
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
This commit is contained in:
Johan Klokkhammer Helsing 2019-10-31 10:02:09 +01:00
parent 87b4273398
commit 68e70fd950
2 changed files with 4 additions and 2 deletions

View File

@ -93,7 +93,8 @@ void tst_WaylandClientFullScreenShellV1::createDestroyWindow()
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
setenv("XDG_RUNTIME_DIR", ".", 1); QTemporaryDir tmpRuntimeDir;
setenv("XDG_RUNTIME_DIR", tmpRuntimeDir.path().toLocal8Bit(), 1);
setenv("QT_QPA_PLATFORM", "wayland", 1); // force QGuiApplication to use wayland plugin setenv("QT_QPA_PLATFORM", "wayland", 1); // force QGuiApplication to use wayland plugin
setenv("QT_WAYLAND_SHELL_INTEGRATION", "fullscreen-shell-v1", 1); setenv("QT_WAYLAND_SHELL_INTEGRATION", "fullscreen-shell-v1", 1);
setenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1", 1); // window decorations don't make much sense here setenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1", 1); // window decorations don't make much sense here

View File

@ -422,7 +422,8 @@ void tst_WaylandClientXdgShellV6::dontSpamExposeEvents()
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
setenv("XDG_RUNTIME_DIR", ".", 1); QTemporaryDir tmpRuntimeDir;
setenv("XDG_RUNTIME_DIR", tmpRuntimeDir.path().toLocal8Bit(), 1);
setenv("QT_QPA_PLATFORM", "wayland", 1); // force QGuiApplication to use wayland plugin setenv("QT_QPA_PLATFORM", "wayland", 1); // force QGuiApplication to use wayland plugin
setenv("QT_WAYLAND_SHELL_INTEGRATION", "xdg-shell-v6", 1); setenv("QT_WAYLAND_SHELL_INTEGRATION", "xdg-shell-v6", 1);