summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2011-09-16 16:14:49 +1000
committerRobert Ancell <robert.ancell@canonical.com>2011-09-16 16:14:49 +1000
commit72b14840ba6268d33950f1933e00a2db749184da (patch)
tree12606513db40848abbbe6615e708978964801c44
parent82f9909c63a3f622c9abb31874ffce170e76e8ff (diff)
downloadlightdm-72b14840ba6268d33950f1933e00a2db749184da.tar.gz
Test greeter-setup script hook failing
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/scripts/script-hook-fail-greeter-setup.conf24
-rwxr-xr-xtests/test-script-hook-fail-greeter-setup2
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f0df580e..c8b6d739 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -35,6 +35,7 @@ TESTS = \
test-plymouth-no-seat \
test-script-hooks \
test-script-hook-fail-display-setup \
+ test-script-hook-fail-greeter-setup \
test-switch-to-greeter \
test-switch-to-guest \
test-switch-to-user \
@@ -99,6 +100,7 @@ EXTRA_DIST = \
scripts/plymouth-no-seat.conf \
scripts/script-hooks.conf \
scripts/script-hook-fail-display-setup.conf \
+ scripts/script-hook-fail-greeter-setup.conf \
scripts/switch-to-greeter.conf \
scripts/switch-to-guest.conf \
scripts/switch-to-user.conf \
diff --git a/tests/scripts/script-hook-fail-greeter-setup.conf b/tests/scripts/script-hook-fail-greeter-setup.conf
new file mode 100644
index 00000000..18b2d335
--- /dev/null
+++ b/tests/scripts/script-hook-fail-greeter-setup.conf
@@ -0,0 +1,24 @@
+#
+# Check LightDM stops the display if the display setup script returns an error
+#
+
+[SeatDefaults]
+greeter-setup-script=test-script-hook GREETER-SETUP 1
+
+#?RUNNER DAEMON-START
+
+# One X server should start by default
+#?XSERVER :50 START
+#?XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+#?XSERVER :50 ACCEPT-CONNECT
+
+# Setup script fails
+#?SCRIPT-HOOK GREETER-SETUP
+
+#?XSERVER :50 TERMINATE SIGNAL=15
+
+# Cleanup
+# Don't know what order they will terminate
+#?RUNNER DAEMON-EXIT STATUS=1
diff --git a/tests/test-script-hook-fail-greeter-setup b/tests/test-script-hook-fail-greeter-setup
new file mode 100755
index 00000000..126a9782
--- /dev/null
+++ b/tests/test-script-hook-fail-greeter-setup
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/test-runner script-hook-fail-greeter-setup test-gobject-greeter