tests/xwayland: Ensure $DISPLAY is correctly set

We rely on the Xwayland launcher setting $DISPLAY to connect to our own
X server. Make very sure in the tests that we're actually getting that
set properly.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-05-01 17:23:43 +01:00
parent e64232a808
commit f360818960
1 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,8 @@ fixture_setup(struct weston_test_harness *harness)
{
struct compositor_setup setup;
unsetenv("DISPLAY");
compositor_setup_defaults(&setup);
setup.shell = SHELL_TEST_DESKTOP;
setup.xwayland = true;
@ -122,6 +124,8 @@ TEST(xwayland_client_test)
color_rgb888(&bg_color, 255, 0, 0);
assert(getenv("DISPLAY"));
conn = create_x11_connection();
assert(conn);
window = create_x11_window(100, 100, 100, 100, conn, bg_color, NULL);