]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Add in handling of "plymouth quit" when using the compositor to send the plymouth...
authorChris Townsend <christopher.townsend@canonical.com>
Fri, 19 Jul 2013 23:54:09 +0000 (23:54 +0000)
committerTarmac <Unknown>
Fri, 19 Jul 2013 23:54:09 +0000 (23:54 +0000)
Approved by PS Jenkins bot, Robert Ancell.

src/seat-unity.c
tests/Makefile.am
tests/scripts/unity-plymouth.conf [new file with mode: 0644]
tests/test-unity-plymouth [new file with mode: 0755]

index d065cbed476bc9422a048954642e823b281f6b2b..a5ef79f6eafcaa7dc45362b9d7de2013fa845a2d 100644 (file)
@@ -146,6 +146,12 @@ compositor_run_cb (Process *process, SeatUnity *seat)
              close (fd);
          }
     }
+
+    if (seat->priv->stopping_plymouth)
+    {      
+        seat->priv->stopping_plymouth = FALSE;
+        plymouth_quit (TRUE);
+    }  
 }
 
 static void
@@ -309,6 +315,7 @@ seat_unity_start (Seat *seat)
         if (active_vt >= vt_get_min ())
         {
             g_debug ("Compositor will replace Plymouth");
+            SEAT_UNITY (seat)->priv->stopping_plymouth = TRUE;
             SEAT_UNITY (seat)->priv->vt = active_vt;
             plymouth_deactivate ();
         }
index 5ed69a0d5091f3e92669b6debe9a78944a8c00e3..59bec1126bc8b90858dcf2dc06c8136089b1efcb 100644 (file)
@@ -163,7 +163,8 @@ TESTS = \
        test-unity-compositor-fail-ready \
        test-unity-autologin \
        test-unity-login \
-       test-unity-switch
+       test-unity-switch \
+       test-unity-plymouth
 
 #      test-session-exit-error
 #      test-greeter-no-exit
@@ -372,6 +373,7 @@ EXTRA_DIST = \
        scripts/unity-compositor-fail-ready.conf \
        scripts/unity-compositor-fail-start.conf \
        scripts/unity-login.conf \
+       scripts/unity-plymouth.conf \
        scripts/unity-switch.conf \
        scripts/users.conf \
        scripts/util-path.conf \
diff --git a/tests/scripts/unity-plymouth.conf b/tests/scripts/unity-plymouth.conf
new file mode 100644 (file)
index 0000000..879785e
--- /dev/null
@@ -0,0 +1,49 @@
+#
+# Check Plymouth quits when Unity System compositor server is started.  Plymouth is on an active VT so it handshakes with u-s-c.
+#
+
+[SeatDefaults]
+type=unity
+autologin-user=have-password1
+user-session=default
+
+[test-plymouth-config]
+enabled=true
+has-active-vt=true
+active=true
+
+#?RUNNER DAEMON-START
+
+# Check if Plymouth is running
+#?PLYMOUTH PING ACTIVE=TRUE
+#?PLYMOUTH HAS-ACTIVE-VT=TRUE
+#?PLYMOUTH DEACTIVATE
+
+# System compositor starts
+#?UNITY-SYSTEM-COMPOSITOR START VT=7
+#?*UNITY-SYSTEM-COMPOSITOR READY
+
+# Plymouth quits but keeps image in framebuffer
+#?PLYMOUTH QUIT RETAIN-SPLASH=TRUE
+
+# X server starts
+#?XSERVER-0 START MIR-ID=0
+#?XSERVER-0 INDICATE-READY
+   
+# LightDM connects to X server
+#?XSERVER-0 ACCEPT-CONNECT
+
+# Session starts
+#?SESSION-X-0 START USER=have-password1
+#?XSERVER-0 ACCEPT-CONNECT
+#?SESSION-X-0 CONNECT-XSERVER
+
+# System compositor switches to session
+#?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=0
+
+# Cleanup
+#?*STOP-DAEMON
+#?SESSION-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
+#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
+#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/test-unity-plymouth b/tests/test-unity-plymouth
new file mode 100755 (executable)
index 0000000..a6fd8ed
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner unity-plymouth test-gobject-greeter