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).
This commit is contained in:
parent
1541fa351b
commit
9153d8ed64
|
@ -543,7 +543,7 @@ sub waitForX {
|
||||||
retry sub {
|
retry sub {
|
||||||
my ($status, $out) = $self->execute("journalctl -b SYSLOG_IDENTIFIER=systemd | grep 'session opened'");
|
my ($status, $out) = $self->execute("journalctl -b SYSLOG_IDENTIFIER=systemd | grep 'session opened'");
|
||||||
return 0 if $status != 0;
|
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;
|
return 1 if $status == 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -466,6 +466,7 @@ in
|
||||||
xorg.xsetroot
|
xorg.xsetroot
|
||||||
xorg.xinput
|
xorg.xinput
|
||||||
xorg.xprop
|
xorg.xprop
|
||||||
|
xorg.xauth
|
||||||
pkgs.xterm
|
pkgs.xterm
|
||||||
pkgs.xdg_utils
|
pkgs.xdg_utils
|
||||||
]
|
]
|
||||||
|
|
|
@ -32,6 +32,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
||||||
|
|
||||||
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
|
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
|
||||||
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
$machine->waitForWindow(qr/Terminal/);
|
$machine->waitForWindow(qr/Terminal/);
|
||||||
$machine->sleep(20);
|
$machine->sleep(20);
|
||||||
$machine->screenshot("screen");
|
$machine->screenshot("screen");
|
||||||
|
|
|
@ -27,6 +27,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
||||||
|
|
||||||
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
|
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
|
||||||
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
$machine->waitForWindow(qr/Terminal/);
|
$machine->waitForWindow(qr/Terminal/);
|
||||||
$machine->mustSucceed("timeout 900 bash -c 'journalctl -f|grep -m 1 \"GNOME Shell started\"'");
|
$machine->mustSucceed("timeout 900 bash -c 'journalctl -f|grep -m 1 \"GNOME Shell started\"'");
|
||||||
$machine->sleep(10);
|
$machine->sleep(10);
|
||||||
|
|
|
@ -13,6 +13,8 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
testScript = { nodes, ... }: ''
|
testScript = { nodes, ... }: ''
|
||||||
$machine->waitForX;
|
$machine->waitForX;
|
||||||
|
$machine->waitForFile("/home/alice/.Xauthority");
|
||||||
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
$machine->waitForWindow(qr/first configuration/);
|
$machine->waitForWindow(qr/first configuration/);
|
||||||
$machine->sleep(1);
|
$machine->sleep(1);
|
||||||
$machine->screenshot("started");
|
$machine->screenshot("started");
|
||||||
|
|
|
@ -41,11 +41,13 @@ import ./make-test.nix ({ pkgs, ... }: {
|
||||||
pkgs.kde4.kdenetwork
|
pkgs.kde4.kdenetwork
|
||||||
pkgs.kde4.kdetoys
|
pkgs.kde4.kdetoys
|
||||||
pkgs.kde4.kdewebdev
|
pkgs.kde4.kdewebdev
|
||||||
|
pkgs.xorg.xmessage
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
$machine->waitUntilSucceeds("pgrep plasma-desktop");
|
$machine->waitUntilSucceeds("pgrep plasma-desktop");
|
||||||
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
$machine->waitForWindow(qr/plasma-desktop/);
|
$machine->waitForWindow(qr/plasma-desktop/);
|
||||||
|
|
||||||
# Check that logging in has given the user ownership of devices.
|
# Check that logging in has given the user ownership of devices.
|
||||||
|
@ -62,7 +64,7 @@ import ./make-test.nix ({ pkgs, ... }: {
|
||||||
|
|
||||||
$machine->sleep(10);
|
$machine->sleep(10);
|
||||||
|
|
||||||
$machine->screenshot("screen");
|
$machine->screenshot("screen");
|
||||||
'';
|
'';
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -22,6 +22,8 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
$machine->waitForText(qr/${user.description}/);
|
$machine->waitForText(qr/${user.description}/);
|
||||||
$machine->screenshot("lightdm");
|
$machine->screenshot("lightdm");
|
||||||
$machine->sendChars("${user.password}\n");
|
$machine->sendChars("${user.password}\n");
|
||||||
|
$machine->waitForFile("/home/alice/.Xauthority");
|
||||||
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
$machine->waitForWindow("^IceWM ");
|
$machine->waitForWindow("^IceWM ");
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
@ -24,6 +24,8 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
testScript = { nodes, ... }: ''
|
testScript = { nodes, ... }: ''
|
||||||
startAll;
|
startAll;
|
||||||
|
$machine->waitForFile("/home/alice/.Xauthority");
|
||||||
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
$machine->waitForWindow("^IceWM ");
|
$machine->waitForWindow("^IceWM ");
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,6 +23,8 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
|
|
||||||
testScript = { nodes, ... }: ''
|
testScript = { nodes, ... }: ''
|
||||||
startAll;
|
startAll;
|
||||||
|
$machine->waitForFile("/home/alice/.Xauthority");
|
||||||
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
$machine->waitForWindow("^IceWM ");
|
$machine->waitForWindow("^IceWM ");
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
@ -20,6 +20,8 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
testScript =
|
testScript =
|
||||||
''
|
''
|
||||||
$machine->waitForX;
|
$machine->waitForX;
|
||||||
|
$machine->waitForFile("/home/alice/.Xauthority");
|
||||||
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
$machine->waitForWindow(qr/xfce4-panel/);
|
$machine->waitForWindow(qr/xfce4-panel/);
|
||||||
$machine->sleep(10);
|
$machine->sleep(10);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue