diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2013-07-25 16:05:55 +1200 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2013-07-25 16:05:55 +1200 |
commit | 1b081a25dc053f9febc2d283007174cbf4d4762d (patch) | |
tree | 756be0af4350c1ac2e9b000f252f687c6304d488 /tests | |
parent | e546c34699dbb5f8b7ee2eb92a515d26b7df0b80 (diff) | |
download | lightdm-1b081a25dc053f9febc2d283007174cbf4d4762d.tar.gz |
More fixing
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/unity-mir-login.conf | 2 | ||||
-rw-r--r-- | tests/src/test-gobject-greeter.c | 21 | ||||
-rw-r--r-- | tests/src/test-session.c | 7 |
3 files changed, 21 insertions, 9 deletions
diff --git a/tests/scripts/unity-mir-login.conf b/tests/scripts/unity-mir-login.conf index d440c78b..a0aabd61 100644 --- a/tests/scripts/unity-mir-login.conf +++ b/tests/scripts/unity-mir-login.conf @@ -9,7 +9,7 @@ user-session=default #?RUNNER DAEMON-START # System compositor starts -#?UNITY-SYSTEM-COMPOSITOR START +#?UNITY-SYSTEM-COMPOSITOR START VT=7 #?*UNITY-SYSTEM-COMPOSITOR READY # Greeter starts diff --git a/tests/src/test-gobject-greeter.c b/tests/src/test-gobject-greeter.c index dd06c728..a2f7bb0c 100644 --- a/tests/src/test-gobject-greeter.c +++ b/tests/src/test-gobject-greeter.c @@ -299,19 +299,28 @@ user_removed_cb (LightDMUserList *user_list, LightDMUser *user) int main (int argc, char **argv) { - gchar *display; + gchar *display, *mir_socket, *mir_id; #if !defined(GLIB_VERSION_2_36) g_type_init (); #endif display = getenv ("DISPLAY"); - if (display == NULL) - greeter_id = g_strdup ("GREETER-?"); - else if (display[0] == ':') - greeter_id = g_strdup_printf ("GREETER-X-%s", display + 1); + mir_socket = getenv ("MIR_SERVER_FILE"); + mir_id = getenv ("MIR_ID"); + if (display) + { + if (display[0] == ':') + greeter_id = g_strdup_printf ("GREETER-X-%s", display + 1); + else + greeter_id = g_strdup_printf ("GREETER-X-%s", display); + } + else if (mir_id) + greeter_id = g_strdup_printf ("GREETER-MIR-%s", mir_id); + else if (mir_socket) + greeter_id = g_strdup ("GREETER-MIR"); else - greeter_id = g_strdup_printf ("GREETER-X-%s", display); + greeter_id = g_strdup ("GREETER-?"); loop = g_main_loop_new (NULL, FALSE); diff --git a/tests/src/test-session.c b/tests/src/test-session.c index 6940cbdb..12c3a3b7 100644 --- a/tests/src/test-session.c +++ b/tests/src/test-session.c @@ -167,11 +167,12 @@ request_cb (const gchar *request) int main (int argc, char **argv) { - gchar *display, *mir_socket; + gchar *display, *mir_socket, *mir_id; int fd, open_max; display = getenv ("DISPLAY"); - mir_socket = getenv ("DISPLAY"); + mir_socket = getenv ("MIR_SERVER_FILE"); + mir_id = getenv ("MIR_ID"); if (display) { if (display[0] == ':') @@ -179,6 +180,8 @@ main (int argc, char **argv) else session_id = g_strdup_printf ("SESSION-X-%s", display); } + else if (mir_id) + session_id = g_strdup_printf ("SESSION-MIR-%s", mir_id); else if (mir_socket) session_id = g_strdup ("SESSION-MIR"); else |