Skip to content

Commit c844a41

Browse files
committed
Also test xserver-config option
1 parent 8acc8b9 commit c844a41

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

data/lightdm.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
# pam-greeter-service = PAM service to use for greeters
4747
# xserver-command = X server command to run (can also contain arguments e.g. X -special-option)
4848
# xmir-command = Xmir server command to run (can also contain arguments e.g. Xmir -special-option)
49-
# xserver-layout = Layout to pass to X server
5049
# xserver-config = Config file to pass to X server
50+
# xserver-layout = Layout to pass to X server
5151
# xserver-allow-tcp = True if TCP/IP connections are allowed to this X server
5252
# xserver-share = True if the X server is shared for both greeter and session
5353
# xserver-hostname = Hostname of X server (only for type=xremote)
@@ -88,8 +88,8 @@
8888
#pam-greeter-service=lightdm-greeter
8989
#xserver-command=X
9090
#xmir-command=Xmir
91-
#xserver-layout=
9291
#xserver-config=
92+
#xserver-layout=
9393
#xserver-allow-tcp=false
9494
#xserver-share=true
9595
#xserver-hostname=

tests/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ TESTS = \
3434
test-autologin-new-authtok \
3535
test-autologin-timeout-gobject \
3636
test-autologin-guest-timeout-gobject \
37-
test-xserver-config-layout \
37+
test-xserver-config \
3838
test-allow-tcp-xorg-1.16 \
3939
test-allow-tcp-xorg-1.17 \
4040
test-change-authentication \
@@ -591,7 +591,7 @@ EXTRA_DIST = \
591591
scripts/xdmcp-server-guest.conf \
592592
scripts/xdmcp-server-login.conf \
593593
scripts/xdmcp-server-open-file-descriptors.conf \
594-
scripts/xserver-config-layout.conf \
594+
scripts/xserver-config.conf \
595595
scripts/xserver-fail-start.conf \
596596
scripts/xserver-no-share.conf \
597597
scripts/seatdefaults-still-supported.conf

tests/scripts/xserver-config-layout.conf renamed to tests/scripts/xserver-config.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
#
2-
# Check xserver-layout option works
2+
# Check can set X server configuration
33
#
44

55
[Seat:*]
66
autologin-user=have-password1
77
user-session=default
8+
xserver-config=custom.conf
89
xserver-layout=custom
910

1011
#?*START-DAEMON
1112
#?RUNNER DAEMON-START
1213

1314
# X server starts
14-
#?XSERVER-0 START LAYOUT=custom VT=7 SEAT=seat0
15+
#?XSERVER-0 START CONFIG=custom.conf LAYOUT=custom VT=7 SEAT=seat0
1516

1617
# Daemon connects when X server is ready
1718
#?*XSERVER-0 INDICATE-READY

tests/src/X.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ static gboolean listen_tcp = TRUE;
3131
/* TRUE if we allow Unix connections */
3232
static gboolean listen_unix = TRUE;
3333

34+
/* Configuration to use */
35+
static gchar *config_file = NULL;
36+
3437
/* Configuration layout to use */
3538
static gchar *layout = NULL;
3639

@@ -263,6 +266,11 @@ main (int argc, char **argv)
263266
{
264267
display_number = atoi (arg + 1);
265268
}
269+
else if (strcmp (arg, "-config") == 0)
270+
{
271+
config_file = argv[i+1];
272+
i++;
273+
}
266274
else if (strcmp (arg, "-layout") == 0)
267275
{
268276
layout = argv[i+1];
@@ -348,6 +356,7 @@ main (int argc, char **argv)
348356
{
349357
g_printerr ("Unrecognized option: %s\n"
350358
"Use: %s [:<display>] [option]\n"
359+
"-config file Specify a configuration file\n"
351360
"-layout name Specify the ServerLayout section name\n"
352361
"-auth file Select authorization file\n"
353362
"-nolisten protocol Don't listen on protocol\n"
@@ -377,6 +386,8 @@ main (int argc, char **argv)
377386

378387
status_text = g_string_new ("");
379388
g_string_printf (status_text, "%s START", id);
389+
if (config_file)
390+
g_string_append_printf (status_text, " CONFIG=%s", config_file);
380391
if (layout)
381392
g_string_append_printf (status_text, " LAYOUT=%s", layout);
382393
if (vt_number >= 0)

tests/test-xserver-config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
./src/dbus-env ./src/test-runner xserver-config test-gobject-greeter

0 commit comments

Comments
 (0)