Merge pull request #73138 from worldofpeace/port-xfce-tests
Port xfce test to python
This commit is contained in:
commit
4414a3bc7c
1 changed files with 14 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "xfce";
|
||||
|
||||
machine =
|
||||
|
@ -18,20 +18,21 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
virtualisation.memorySize = 1024;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForX;
|
||||
$machine->waitForFile("/home/alice/.Xauthority");
|
||||
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||
$machine->waitForWindow(qr/xfce4-panel/);
|
||||
$machine->sleep(10);
|
||||
testScript = { nodes, ... }: let
|
||||
user = nodes.machine.config.users.users.alice;
|
||||
in ''
|
||||
machine.wait_for_x()
|
||||
machine.wait_for_file("${user.home}/.Xauthority")
|
||||
machine.succeed("xauth merge ${user.home}/.Xauthority")
|
||||
machine.wait_for_window("xfce4-panel")
|
||||
machine.sleep(10)
|
||||
|
||||
# Check that logging in has given the user ownership of devices.
|
||||
$machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
|
||||
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
|
||||
|
||||
$machine->succeed("su - alice -c 'DISPLAY=:0.0 xfce4-terminal &'");
|
||||
$machine->waitForWindow(qr/Terminal/);
|
||||
$machine->sleep(10);
|
||||
$machine->screenshot("screen");
|
||||
machine.succeed("su - ${user.name} -c 'DISPLAY=:0.0 xfce4-terminal &'")
|
||||
machine.wait_for_window("Terminal")
|
||||
machine.sleep(10)
|
||||
machine.screenshot("screen")
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue