diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/mir-greeter-mir-session.conf | 6 | ||||
-rw-r--r-- | tests/scripts/mir-greeter-x-session.conf | 10 | ||||
-rw-r--r-- | tests/scripts/mir-session-x-greeter.conf | 5 | ||||
-rw-r--r-- | tests/scripts/unity-mir-login.conf | 10 | ||||
-rw-r--r-- | tests/src/test-gobject-greeter.c | 13 | ||||
-rw-r--r-- | tests/src/test-session.c | 17 | ||||
-rwxr-xr-x | tests/test-mir-session-x-greeter | 2 |
7 files changed, 42 insertions, 21 deletions
diff --git a/tests/scripts/mir-greeter-mir-session.conf b/tests/scripts/mir-greeter-mir-session.conf index 2d7a9bd4..9d03c2a8 100644 --- a/tests/scripts/mir-greeter-mir-session.conf +++ b/tests/scripts/mir-greeter-mir-session.conf @@ -9,7 +9,6 @@ user-session=mir # Greeter starts #?GREETER-MIR START VT=7 -#?XSERVER-0 ACCEPT-CONNECT #?GREETER-MIR CONNECT-TO-DAEMON #?GREETER-MIR CONNECTED-TO-DAEMON @@ -19,7 +18,10 @@ user-session=mir #?*GREETER-MIR START-SESSION # Session starts -#?SESSION-MIR START VT=8 USER=have-password1 +#?SESSION-MIR START VT=8 USER=no-password1 + +# Switch to session +#?VT ACTIVATE VT=8 # Greeter quits once session ready #?GREETER-MIR TERMINATE SIGNAL=15 diff --git a/tests/scripts/mir-greeter-x-session.conf b/tests/scripts/mir-greeter-x-session.conf index 457d50bc..fd809db9 100644 --- a/tests/scripts/mir-greeter-x-session.conf +++ b/tests/scripts/mir-greeter-x-session.conf @@ -9,7 +9,6 @@ user-session=default # Greeter starts #?GREETER-MIR START VT=7 -#?XSERVER-0 ACCEPT-CONNECT #?GREETER-MIR CONNECT-TO-DAEMON #?GREETER-MIR CONNECTED-TO-DAEMON @@ -17,7 +16,6 @@ user-session=default #?*GREETER-MIR AUTHENTICATE USERNAME=no-password1 #?GREETER-MIR AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE #?*GREETER-MIR START-SESSION -#?GREETER-MIR TERMINATE SIGNAL=15 # X server starts for session #?XSERVER-0 START VT=8 @@ -27,8 +25,14 @@ user-session=default #?XSERVER-0 INDICATE-READY #?XSERVER-0 ACCEPT-CONNECT +# Switch to session +#?VT ACTIVATE VT=8 + +# Greeter terminates +#?GREETER-MIR TERMINATE SIGNAL=15 + # Session starts -#?SESSION-X-0 START USER=have-password1 +#?SESSION-X-0 START USER=no-password1 #?XSERVER-0 ACCEPT-CONNECT #?SESSION-X-0 CONNECT-XSERVER diff --git a/tests/scripts/mir-session-x-greeter.conf b/tests/scripts/mir-session-x-greeter.conf index c59cd48c..fa1ed4e8 100644 --- a/tests/scripts/mir-session-x-greeter.conf +++ b/tests/scripts/mir-session-x-greeter.conf @@ -28,7 +28,10 @@ user-session=mir #?*GREETER-X-0 START-SESSION # Session starts -#?SESSION-MIR START VT=8 USER=have-password1 +#?SESSION-MIR START VT=8 USER=no-password1 + +# Switch to session +#?VT ACTIVATE VT=8 # Greeter quits once session ready #?GREETER-X-0 TERMINATE SIGNAL=15 diff --git a/tests/scripts/unity-mir-login.conf b/tests/scripts/unity-mir-login.conf index a0aabd61..c5fa6ed0 100644 --- a/tests/scripts/unity-mir-login.conf +++ b/tests/scripts/unity-mir-login.conf @@ -4,7 +4,7 @@ [SeatDefaults] type=unity -user-session=default +user-session=mir #?RUNNER DAEMON-START @@ -21,14 +21,12 @@ user-session=default #?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=0 # Log into account with a password -#?*GREETER-MIR-0 AUTHENTICATE USERNAME=have-password1 -#?GREETER-MIR-0 SHOW-PROMPT TEXT="Password:" -#?*GREETER-MIR-0 RESPOND TEXT="password" -#?GREETER-MIR-0 AUTHENTICATION-COMPLETE USERNAME=have-password1 AUTHENTICATED=TRUE +#?*GREETER-MIR-0 AUTHENTICATE USERNAME=no-password1 +#?GREETER-MIR-0 AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE #?*GREETER-MIR-0 START-SESSION # Session starts -#?SESSION-MIR-1 START USER=have-password1 +#?SESSION-MIR-1 START USER=no-password1 # System compositor switches to session #?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=1 diff --git a/tests/src/test-gobject-greeter.c b/tests/src/test-gobject-greeter.c index dd9a32b7..cfe4612a 100644 --- a/tests/src/test-gobject-greeter.c +++ b/tests/src/test-gobject-greeter.c @@ -299,7 +299,8 @@ user_removed_cb (LightDMUserList *user_list, LightDMUser *user) int main (int argc, char **argv) { - gchar *display, *mir_socket, *mir_id; + gchar *display, *mir_socket, *mir_vt, *mir_id; + GString *status_text; #if !defined(GLIB_VERSION_2_36) g_type_init (); @@ -307,6 +308,7 @@ main (int argc, char **argv) display = getenv ("DISPLAY"); mir_socket = getenv ("MIR_SERVER_FILE"); + mir_vt = getenv ("MIR_SERVER_VT"); mir_id = getenv ("MIR_ID"); if (display) { @@ -317,7 +319,7 @@ main (int argc, char **argv) } else if (mir_id) greeter_id = g_strdup_printf ("GREETER-MIR-%s", mir_id); - else if (mir_socket) + else if (mir_socket || mir_vt) greeter_id = g_strdup ("GREETER-MIR"); else greeter_id = g_strdup ("GREETER-?"); @@ -329,7 +331,12 @@ main (int argc, char **argv) status_connect (request_cb); - status_notify ("%s START", greeter_id); + status_text = g_string_new (""); + g_string_printf (status_text, "%s START", greeter_id); + if (mir_vt > 0) + g_string_append_printf (status_text, " VT=%s", mir_vt); + status_notify (status_text->str); + g_string_free (status_text, TRUE); config = g_key_file_new (); g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL); diff --git a/tests/src/test-session.c b/tests/src/test-session.c index 371ad6f7..eb96a795 100644 --- a/tests/src/test-session.c +++ b/tests/src/test-session.c @@ -167,11 +167,13 @@ request_cb (const gchar *request) int main (int argc, char **argv) { - gchar *display, *mir_socket, *mir_id; + gchar *display, *mir_socket, *mir_vt, *mir_id; + GString *status_text; int fd, open_max; display = getenv ("DISPLAY"); mir_socket = getenv ("MIR_SERVER_FILE"); + mir_vt = getenv ("MIR_SERVER_VT"); mir_id = getenv ("MIR_ID"); if (display) { @@ -182,7 +184,7 @@ main (int argc, char **argv) } else if (mir_id) session_id = g_strdup_printf ("SESSION-MIR-%s", mir_id); - else if (mir_socket) + else if (mir_socket || mir_vt) session_id = g_strdup ("SESSION-MIR"); else session_id = g_strdup ("SESSION-?"); @@ -208,10 +210,15 @@ main (int argc, char **argv) status_connect (request_cb); + status_text = g_string_new (""); + g_string_printf (status_text, "%s START", session_id); + if (mir_vt > 0) + g_string_append_printf (status_text, " VT=%s", mir_vt); if (argc > 1) - status_notify ("%s START NAME=%s USER=%s", session_id, argv[1], getenv ("USER")); - else - status_notify ("%s START USER=%s", session_id, getenv ("USER")); + g_string_append_printf (status_text, " NAME=%s", argv[1]); + g_string_append_printf (status_text, " USER=%s", getenv ("USER")); + status_notify (status_text->str); + g_string_free (status_text, TRUE); config = g_key_file_new (); g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL); diff --git a/tests/test-mir-session-x-greeter b/tests/test-mir-session-x-greeter index 20a0e974..20ba7fbb 100755 --- a/tests/test-mir-session-x-greeter +++ b/tests/test-mir-session-x-greeter @@ -1,2 +1,2 @@ #!/bin/sh -./src/dbus-env ./src/test-runner mir-session-x-greeter test-mir-greeter +./src/dbus-env ./src/test-runner mir-session-x-greeter test-gobject-greeter |