Merge pull request #73135 from worldofpeace/port-lightdm-test

nixosTests.lightdm: port to python
This commit is contained in:
worldofpeace 2019-11-10 23:05:51 +00:00 committed by GitHub
commit 8cf9315425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "lightdm";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ aszlig worldofpeace ];
@ -18,12 +18,12 @@ import ./make-test.nix ({ pkgs, ...} : {
testScript = { nodes, ... }: let
user = nodes.machine.config.users.users.alice;
in ''
startAll;
$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 ");
start_all()
machine.wait_for_text("${user.description}")
machine.screenshot("lightdm")
machine.send_chars("${user.password}\n")
machine.wait_for_file("${user.home}/.Xauthority")
machine.succeed("xauth merge ${user.home}/.Xauthority")
machine.wait_for_window("^IceWM ")
'';
})