diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-04-12 19:12:47 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-04-12 19:13:47 +0200 |
commit | 9153d8ed640e4df38422cad89a72a43c9df9f057 (patch) | |
tree | 13ad012f954bd44233c3eba440141c2b66e9487f | |
parent | 1541fa351b4d664c51dddaeaa67ee0652892f405 (diff) |
Fix X11 tests broken by the removal of -ac
Probably missed a few. Also adding xauth to the system path (it was
already in the closure).
-rw-r--r-- | nixos/lib/test-driver/Machine.pm | 2 | ||||
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 1 | ||||
-rw-r--r-- | nixos/tests/gnome3-gdm.nix | 1 | ||||
-rw-r--r-- | nixos/tests/gnome3.nix | 1 | ||||
-rw-r--r-- | nixos/tests/i3wm.nix | 2 | ||||
-rw-r--r-- | nixos/tests/kde4.nix | 6 | ||||
-rw-r--r-- | nixos/tests/lightdm.nix | 2 | ||||
-rw-r--r-- | nixos/tests/sddm-kde5.nix | 2 | ||||
-rw-r--r-- | nixos/tests/sddm.nix | 2 | ||||
-rw-r--r-- | nixos/tests/xfce.nix | 2 |
10 files changed, 18 insertions, 3 deletions
diff --git a/nixos/lib/test-driver/Machine.pm b/nixos/lib/test-driver/Machine.pm index 8ac0a31f2875..37d6518fd8d7 100644 --- a/nixos/lib/test-driver/Machine.pm +++ b/nixos/lib/test-driver/Machine.pm @@ -543,7 +543,7 @@ sub waitForX { retry sub { my ($status, $out) = $self->execute("journalctl -b SYSLOG_IDENTIFIER=systemd | grep 'session opened'"); return 0 if $status != 0; - ($status, $out) = $self->execute("xwininfo -root > /dev/null 2>&1"); + ($status, $out) = $self->execute("[ -e /tmp/.X11-unix/X0 ]"); return 1 if $status == 0; } }); diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 84fe8082666c..ff44963c94fa 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -466,6 +466,7 @@ in xorg.xsetroot xorg.xinput xorg.xprop + xorg.xauth pkgs.xterm pkgs.xdg_utils ] diff --git a/nixos/tests/gnome3-gdm.nix b/nixos/tests/gnome3-gdm.nix index 1c07ddf79c2e..42425b57ba33 100644 --- a/nixos/tests/gnome3-gdm.nix +++ b/nixos/tests/gnome3-gdm.nix @@ -32,6 +32,7 @@ import ./make-test.nix ({ pkgs, ...} : { $machine->succeed("getfacl /dev/snd/timer | grep -q alice"); $machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'"); + $machine->succeed("xauth merge ~alice/.Xauthority"); $machine->waitForWindow(qr/Terminal/); $machine->sleep(20); $machine->screenshot("screen"); diff --git a/nixos/tests/gnome3.nix b/nixos/tests/gnome3.nix index 714b35503706..50e7f4eace3b 100644 --- a/nixos/tests/gnome3.nix +++ b/nixos/tests/gnome3.nix @@ -27,6 +27,7 @@ import ./make-test.nix ({ pkgs, ...} : { $machine->succeed("getfacl /dev/snd/timer | grep -q alice"); $machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'"); + $machine->succeed("xauth merge ~alice/.Xauthority"); $machine->waitForWindow(qr/Terminal/); $machine->mustSucceed("timeout 900 bash -c 'journalctl -f|grep -m 1 \"GNOME Shell started\"'"); $machine->sleep(10); diff --git a/nixos/tests/i3wm.nix b/nixos/tests/i3wm.nix index 627a150f641b..4685992d7a05 100644 --- a/nixos/tests/i3wm.nix +++ b/nixos/tests/i3wm.nix @@ -13,6 +13,8 @@ import ./make-test.nix ({ pkgs, ...} : { testScript = { nodes, ... }: '' $machine->waitForX; + $machine->waitForFile("/home/alice/.Xauthority"); + $machine->succeed("xauth merge ~alice/.Xauthority"); $machine->waitForWindow(qr/first configuration/); $machine->sleep(1); $machine->screenshot("started"); diff --git a/nixos/tests/kde4.nix b/nixos/tests/kde4.nix index dc61658cd1c4..2693fb4fbf0a 100644 --- a/nixos/tests/kde4.nix +++ b/nixos/tests/kde4.nix @@ -41,11 +41,13 @@ import ./make-test.nix ({ pkgs, ... }: { pkgs.kde4.kdenetwork pkgs.kde4.kdetoys pkgs.kde4.kdewebdev + pkgs.xorg.xmessage ]; }; - testScript = '' + testScript = '' $machine->waitUntilSucceeds("pgrep plasma-desktop"); + $machine->succeed("xauth merge ~alice/.Xauthority"); $machine->waitForWindow(qr/plasma-desktop/); # Check that logging in has given the user ownership of devices. @@ -62,7 +64,7 @@ import ./make-test.nix ({ pkgs, ... }: { $machine->sleep(10); - $machine->screenshot("screen"); + $machine->screenshot("screen"); ''; }) diff --git a/nixos/tests/lightdm.nix b/nixos/tests/lightdm.nix index f30f9062dcde..97ec79406b88 100644 --- a/nixos/tests/lightdm.nix +++ b/nixos/tests/lightdm.nix @@ -22,6 +22,8 @@ import ./make-test.nix ({ pkgs, ...} : { $machine->waitForText(qr/${user.description}/); $machine->screenshot("lightdm"); $machine->sendChars("${user.password}\n"); + $machine->waitForFile("/home/alice/.Xauthority"); + $machine->succeed("xauth merge ~alice/.Xauthority"); $machine->waitForWindow("^IceWM "); ''; }) diff --git a/nixos/tests/sddm-kde5.nix b/nixos/tests/sddm-kde5.nix index 476cb732e252..f97a6d12b63c 100644 --- a/nixos/tests/sddm-kde5.nix +++ b/nixos/tests/sddm-kde5.nix @@ -24,6 +24,8 @@ import ./make-test.nix ({ pkgs, ...} : { testScript = { nodes, ... }: '' startAll; + $machine->waitForFile("/home/alice/.Xauthority"); + $machine->succeed("xauth merge ~alice/.Xauthority"); $machine->waitForWindow("^IceWM "); ''; }) diff --git a/nixos/tests/sddm.nix b/nixos/tests/sddm.nix index e11b5714d5c2..22a9e1bd2c7c 100644 --- a/nixos/tests/sddm.nix +++ b/nixos/tests/sddm.nix @@ -23,6 +23,8 @@ import ./make-test.nix ({ pkgs, ...} : { testScript = { nodes, ... }: '' startAll; + $machine->waitForFile("/home/alice/.Xauthority"); + $machine->succeed("xauth merge ~alice/.Xauthority"); $machine->waitForWindow("^IceWM "); ''; }) diff --git a/nixos/tests/xfce.nix b/nixos/tests/xfce.nix index c131ef7dc8cd..9f1f997db5f2 100644 --- a/nixos/tests/xfce.nix +++ b/nixos/tests/xfce.nix @@ -20,6 +20,8 @@ import ./make-test.nix ({ pkgs, ...} : { testScript = '' $machine->waitForX; + $machine->waitForFile("/home/alice/.Xauthority"); + $machine->succeed("xauth merge ~alice/.Xauthority"); $machine->waitForWindow(qr/xfce4-panel/); $machine->sleep(10); |