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).

Changed files
+18 -3
nixos
+1 -1
nixos/lib/test-driver/Machine.pm
···
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");
return 1 if $status == 0;
}
});
···
retry sub {
my ($status, $out) = $self->execute("journalctl -b SYSLOG_IDENTIFIER=systemd | grep 'session opened'");
return 0 if $status != 0;
+
($status, $out) = $self->execute("[ -e /tmp/.X11-unix/X0 ]");
return 1 if $status == 0;
}
});
+1
nixos/modules/services/x11/xserver.nix
···
xorg.xsetroot
xorg.xinput
xorg.xprop
pkgs.xterm
pkgs.xdg_utils
]
···
xorg.xsetroot
xorg.xinput
xorg.xprop
+
xorg.xauth
pkgs.xterm
pkgs.xdg_utils
]
+1
nixos/tests/gnome3-gdm.nix
···
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
$machine->waitForWindow(qr/Terminal/);
$machine->sleep(20);
$machine->screenshot("screen");
···
$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");
+1
nixos/tests/gnome3.nix
···
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
$machine->waitForWindow(qr/Terminal/);
$machine->mustSucceed("timeout 900 bash -c 'journalctl -f|grep -m 1 \"GNOME Shell started\"'");
$machine->sleep(10);
···
$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);
+2
nixos/tests/i3wm.nix
···
testScript = { nodes, ... }: ''
$machine->waitForX;
$machine->waitForWindow(qr/first configuration/);
$machine->sleep(1);
$machine->screenshot("started");
···
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");
+4 -2
nixos/tests/kde4.nix
···
pkgs.kde4.kdenetwork
pkgs.kde4.kdetoys
pkgs.kde4.kdewebdev
];
};
-
testScript = ''
$machine->waitUntilSucceeds("pgrep plasma-desktop");
$machine->waitForWindow(qr/plasma-desktop/);
# Check that logging in has given the user ownership of devices.
···
$machine->sleep(10);
-
$machine->screenshot("screen");
'';
})
···
pkgs.kde4.kdenetwork
pkgs.kde4.kdetoys
pkgs.kde4.kdewebdev
+
pkgs.xorg.xmessage
];
};
+
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.
···
$machine->sleep(10);
+
$machine->screenshot("screen");
'';
})
+2
nixos/tests/lightdm.nix
···
$machine->waitForText(qr/${user.description}/);
$machine->screenshot("lightdm");
$machine->sendChars("${user.password}\n");
$machine->waitForWindow("^IceWM ");
'';
})
···
$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 ");
'';
})
+2
nixos/tests/sddm-kde5.nix
···
testScript = { nodes, ... }: ''
startAll;
$machine->waitForWindow("^IceWM ");
'';
})
···
testScript = { nodes, ... }: ''
startAll;
+
$machine->waitForFile("/home/alice/.Xauthority");
+
$machine->succeed("xauth merge ~alice/.Xauthority");
$machine->waitForWindow("^IceWM ");
'';
})
+2
nixos/tests/sddm.nix
···
testScript = { nodes, ... }: ''
startAll;
$machine->waitForWindow("^IceWM ");
'';
})
···
testScript = { nodes, ... }: ''
startAll;
+
$machine->waitForFile("/home/alice/.Xauthority");
+
$machine->succeed("xauth merge ~alice/.Xauthority");
$machine->waitForWindow("^IceWM ");
'';
})
+2
nixos/tests/xfce.nix
···
testScript =
''
$machine->waitForX;
$machine->waitForWindow(qr/xfce4-panel/);
$machine->sleep(10);
···
testScript =
''
$machine->waitForX;
+
$machine->waitForFile("/home/alice/.Xauthority");
+
$machine->succeed("xauth merge ~alice/.Xauthority");
$machine->waitForWindow(qr/xfce4-panel/);
$machine->sleep(10);