diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-11-10 23:06:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-10 23:06:21 +0000 |
commit | ea288463dbeb3ba025884814227a3c6b555b4278 (patch) | |
tree | f773fd3c33a659cd48a3163a790cdb8791b9d4aa | |
parent | 8cf9315425f7ce45e96d6e9114f7dfadd3906529 (diff) | |
parent | b2fc25fe3c7243effb6cebbbac5b762990492339 (diff) | |
download | nixlib-ea288463dbeb3ba025884814227a3c6b555b4278.tar nixlib-ea288463dbeb3ba025884814227a3c6b555b4278.tar.gz nixlib-ea288463dbeb3ba025884814227a3c6b555b4278.tar.bz2 nixlib-ea288463dbeb3ba025884814227a3c6b555b4278.tar.lz nixlib-ea288463dbeb3ba025884814227a3c6b555b4278.tar.xz nixlib-ea288463dbeb3ba025884814227a3c6b555b4278.tar.zst nixlib-ea288463dbeb3ba025884814227a3c6b555b4278.zip |
Merge pull request #73136 from worldofpeace/port-sddm-test
nixosTests.sddm: port to python
-rw-r--r-- | nixos/tests/sddm.nix | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/nixos/tests/sddm.nix b/nixos/tests/sddm.nix index 678bcbeab20a..11d60598445e 100644 --- a/nixos/tests/sddm.nix +++ b/nixos/tests/sddm.nix @@ -3,7 +3,7 @@ pkgs ? import ../.. { inherit system config; } }: -with import ../lib/testing.nix { inherit system pkgs; }; +with import ../lib/testing-python.nix { inherit system pkgs; }; let inherit (pkgs) lib; @@ -26,13 +26,13 @@ let testScript = { nodes, ... }: let user = nodes.machine.config.users.users.alice; in '' - startAll; - $machine->waitForText(qr/select your user/i); - $machine->screenshot("sddm"); - $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("select your user") + machine.screenshot("sddm") + 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 ") ''; }; @@ -57,11 +57,13 @@ let services.xserver.desktopManager.default = "none"; }; - testScript = { ... }: '' - startAll; - $machine->waitForFile("/home/alice/.Xauthority"); - $machine->succeed("xauth merge ~alice/.Xauthority"); - $machine->waitForWindow("^IceWM "); + testScript = { nodes, ... }: let + user = nodes.machine.config.users.users.alice; + in '' + start_all() + machine.wait_for_file("${user.home}/.Xauthority") + machine.succeed("xauth merge ${user.home}/.Xauthority") + machine.wait_for_window("^IceWM ") ''; }; }; |