Client tests: Set WAYLAND_DISPLAY

The tests would previously fail if WAYLAND_DISPLAY was set to something other
than empty or wayland-0. For instance when running multiple compositors and
trying to run the tests, they would fail because they create a compositor on
wayland-0 (using wl_display_add_socket_auto()), but would try to connect to
wayland-1 due to the env var.

Change-Id: I7771d41737410d5c32f5a6db3de4987096cb4d22
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2019-10-14 12:21:41 +02:00
parent da9d36b394
commit 87b4273398

View File

@ -43,6 +43,7 @@ CoreCompositor::CoreCompositor()
}
})
{
qputenv("WAYLAND_DISPLAY", m_socketName);
m_timer.start();
Q_ASSERT(isClean());
}