summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-31 10:02:09 +0100
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-31 10:28:20 +0100
commit37cb6f0f35030420c7d37a126f817cac73aeed97 (patch)
tree5cd44c5b689c53657b25d76d893090afb993aa36
parentb6e4916e837d50881bf1397693d54bb58f4348c9 (diff)
downloadqtwayland-37cb6f0f35030420c7d37a126f817cac73aeed97.tar.gz
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>
-rw-r--r--tests/auto/client/fullscreenshellv1/tst_fullscreenshellv1.cpp3
-rw-r--r--tests/auto/client/iviapplication/tst_iviapplication.cpp3
-rw-r--r--tests/auto/client/xdgshellv6/tst_xdgshellv6.cpp3
3 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/client/fullscreenshellv1/tst_fullscreenshellv1.cpp b/tests/auto/client/fullscreenshellv1/tst_fullscreenshellv1.cpp
index f93d9fbc..55158474 100644
--- a/tests/auto/client/fullscreenshellv1/tst_fullscreenshellv1.cpp
+++ b/tests/auto/client/fullscreenshellv1/tst_fullscreenshellv1.cpp
@@ -93,7 +93,8 @@ void tst_WaylandClientFullScreenShellV1::createDestroyWindow()
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_WAYLAND_SHELL_INTEGRATION", "fullscreen-shell-v1", 1);
setenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1", 1); // window decorations don't make much sense here
diff --git a/tests/auto/client/iviapplication/tst_iviapplication.cpp b/tests/auto/client/iviapplication/tst_iviapplication.cpp
index 59ff6f55..8d6ea648 100644
--- a/tests/auto/client/iviapplication/tst_iviapplication.cpp
+++ b/tests/auto/client/iviapplication/tst_iviapplication.cpp
@@ -124,7 +124,8 @@ void tst_WaylandClientIviApplication::uniqueIviIds()
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_WAYLAND_SHELL_INTEGRATION", "ivi-shell", 1);
setenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1", 1); // window decorations don't make much sense on ivi-application
diff --git a/tests/auto/client/xdgshellv6/tst_xdgshellv6.cpp b/tests/auto/client/xdgshellv6/tst_xdgshellv6.cpp
index a397f60e..9885ee2b 100644
--- a/tests/auto/client/xdgshellv6/tst_xdgshellv6.cpp
+++ b/tests/auto/client/xdgshellv6/tst_xdgshellv6.cpp
@@ -422,7 +422,8 @@ void tst_WaylandClientXdgShellV6::dontSpamExposeEvents()
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_WAYLAND_SHELL_INTEGRATION", "xdg-shell-v6", 1);