summaryrefslogtreecommitdiffstats
path: root/tests/auto/compositor/compositor/tst_compositor.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-14 11:10:42 +0200
committerJohan Helsing <johan.helsing@qt.io>2019-10-14 13:18:34 +0000
commitbd6eb42fa31919aff1906aa60036aa33fd3edaa4 (patch)
treea05852b68725a2abaf9a3310c6d9db81f42b463a /tests/auto/compositor/compositor/tst_compositor.cpp
parent277de587f956dba2a68eb82b9666063ab12c51c4 (diff)
Fix build: Use temporary directories for tests' XDG_RUNTIME_DIR
Using XDG_RUNTIME_DIR="." does not work after qtbase 5542785, and it was a rather brittle solution anyway. Fixes: QTBUG-79185 Change-Id: Iaf9ced66709cc6cbac8a2d54efc64e1a8c528561 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/compositor/compositor/tst_compositor.cpp')
-rw-r--r--tests/auto/compositor/compositor/tst_compositor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/compositor/compositor/tst_compositor.cpp b/tests/auto/compositor/compositor/tst_compositor.cpp
index c425f2ba..c286aae7 100644
--- a/tests/auto/compositor/compositor/tst_compositor.cpp
+++ b/tests/auto/compositor/compositor/tst_compositor.cpp
@@ -110,10 +110,15 @@ private slots:
void viewportDestinationNoSurfaceError();
void viewportSourceNoSurfaceError();
void viewportHiDpi();
+
+private:
+ QTemporaryDir m_tmpRuntimeDir;
};
void tst_WaylandCompositor::init() {
- qputenv("XDG_RUNTIME_DIR", ".");
+ // We need to set a test specific runtime dir so we don't conflict with other tests'
+ // compositors by accident.
+ qputenv("XDG_RUNTIME_DIR", m_tmpRuntimeDir.path().toLocal8Bit());
}
void tst_WaylandCompositor::singleClient()