Merge pull request #73137 from worldofpeace/port-xmonad-test
nixosTests.xmonad: port to python
This commit is contained in:
commit
deb125271c
@ -1,4 +1,4 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "xmonad";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
@ -21,19 +21,21 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
};
|
||||
};
|
||||
|
||||
testScript = { ... }: ''
|
||||
$machine->waitForX;
|
||||
$machine->waitForFile("/home/alice/.Xauthority");
|
||||
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||
$machine->sendKeys("alt-ctrl-x");
|
||||
$machine->waitForWindow(qr/alice.*machine/);
|
||||
$machine->sleep(1);
|
||||
$machine->screenshot("terminal");
|
||||
$machine->waitUntilSucceeds("xmonad --restart");
|
||||
$machine->sleep(3);
|
||||
$machine->sendKeys("alt-shift-ret");
|
||||
$machine->waitForWindow(qr/alice.*machine/);
|
||||
$machine->sleep(1);
|
||||
$machine->screenshot("terminal");
|
||||
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.send_chars("alt-ctrl-x")
|
||||
machine.wait_for_window("${user.name}.*machine")
|
||||
machine.sleep(1)
|
||||
machine.screenshot("terminal")
|
||||
machine.wait_until_succeeds("xmonad --restart")
|
||||
machine.sleep(3)
|
||||
machine.send_chars("alt-shift-ret")
|
||||
machine.wait_for_window("${user.name}.*machine")
|
||||
machine.sleep(1)
|
||||
machine.screenshot("terminal")
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user