]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Add a regression test for xserver-layout option.
authorRobert Ancell <robert.ancell@canonical.com>
Wed, 14 Oct 2015 16:39:04 +0000 (17:39 +0100)
committerRobert Ancell <robert.ancell@canonical.com>
Wed, 14 Oct 2015 16:39:04 +0000 (17:39 +0100)
This is probably a bit useless now we have modern multi-seat support and you can set this in the xserver-command anyway.

tests/Makefile.am
tests/scripts/xserver-config-layout.conf [new file with mode: 0644]
tests/src/X.c

index 9c2241d0bfe50c968416d32b272c2550591f5441..56ac90e9f6ef558785c4951ff845b56c545ef372 100644 (file)
@@ -34,6 +34,7 @@ TESTS = \
        test-autologin-new-authtok \
        test-autologin-timeout-gobject \
        test-autologin-guest-timeout-gobject \
+       test-xserver-config-layout \
        test-allow-tcp-xorg-1.16 \
        test-allow-tcp-xorg-1.17 \    
        test-change-authentication \
@@ -590,6 +591,7 @@ EXTRA_DIST = \
        scripts/xdmcp-server-guest.conf \
        scripts/xdmcp-server-login.conf \
        scripts/xdmcp-server-open-file-descriptors.conf \
+       scripts/xserver-config-layout.conf \
        scripts/xserver-fail-start.conf \
        scripts/xserver-no-share.conf \
        scripts/seatdefaults-still-supported.conf
diff --git a/tests/scripts/xserver-config-layout.conf b/tests/scripts/xserver-config-layout.conf
new file mode 100644 (file)
index 0000000..fb3b9ad
--- /dev/null
@@ -0,0 +1,31 @@
+#
+# Check xserver-layout option works
+#
+
+[Seat:*]
+autologin-user=have-password1
+user-session=default
+xserver-layout=custom
+
+#?*START-DAEMON
+#?RUNNER DAEMON-START
+
+# X server starts
+#?XSERVER-0 START LAYOUT=custom VT=7 SEAT=seat0
+
+# Daemon connects when X server is ready
+#?*XSERVER-0 INDICATE-READY
+#?XSERVER-0 INDICATE-READY
+#?XSERVER-0 ACCEPT-CONNECT
+
+# Session starts
+#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=have-password1
+#?LOGIN1 ACTIVATE-SESSION SESSION=c0
+#?XSERVER-0 ACCEPT-CONNECT
+#?SESSION-X-0 CONNECT-XSERVER
+
+# Cleanup
+#?*STOP-DAEMON
+#?SESSION-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
+#?RUNNER DAEMON-EXIT STATUS=0
index 105fafb6afccbe421843050534452d8b56a1e7be..937d7979e8f1511d15a7031262ef2493b29cd392 100644 (file)
@@ -31,6 +31,9 @@ static gboolean listen_tcp = TRUE;
 /* TRUE if we allow Unix connections */
 static gboolean listen_unix = TRUE;
 
+/* Configuration layout to use */
+static gchar *layout = NULL;
+
 /* Path to authority database to use */
 static gchar *auth_path = NULL;
 
@@ -260,6 +263,11 @@ main (int argc, char **argv)
         {
             display_number = atoi (arg + 1);
         }
+        else if (strcmp (arg, "-layout") == 0)
+        {
+            layout = argv[i+1];
+            i++;
+        }
         else if (strcmp (arg, "-auth") == 0)
         {
             auth_path = argv[i+1];
@@ -340,6 +348,7 @@ main (int argc, char **argv)
         {
             g_printerr ("Unrecognized option: %s\n"
                         "Use: %s [:<display>] [option]\n"
+                        "-layout name           Specify the ServerLayout section name\n"
                         "-auth file             Select authorization file\n"
                         "-nolisten protocol     Don't listen on protocol\n"
                         "-listen protocol       Listen on protocol\n"
@@ -368,6 +377,8 @@ main (int argc, char **argv)
 
     status_text = g_string_new ("");
     g_string_printf (status_text, "%s START", id);
+    if (layout)
+        g_string_append_printf (status_text, " LAYOUT=%s", layout);
     if (vt_number >= 0)
         g_string_append_printf (status_text, " VT=%d", vt_number);
     if (listen_tcp)