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).
release-18.03-flake
Eelco Dolstra 2016-04-12 19:12:47 +02:00
parent 1541fa351b
commit 9153d8ed64
10 changed files with 18 additions and 3 deletions

View File

@ -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;
}
});

View File

@ -466,6 +466,7 @@ in
xorg.xsetroot
xorg.xinput
xorg.xprop
xorg.xauth
pkgs.xterm
pkgs.xdg_utils
]

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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");
'';
})

View File

@ -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 ");
'';
})

View File

@ -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 ");
'';
})

View File

@ -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 ");
'';
})

View File

@ -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);