about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/lightdm.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/tests/lightdm.nix')
-rw-r--r--nixpkgs/nixos/tests/lightdm.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/lightdm.nix b/nixpkgs/nixos/tests/lightdm.nix
new file mode 100644
index 000000000000..c805f1ed9f3c
--- /dev/null
+++ b/nixpkgs/nixos/tests/lightdm.nix
@@ -0,0 +1,29 @@
+import ./make-test.nix ({ pkgs, ...} : {
+  name = "lightdm";
+  meta = with pkgs.stdenv.lib.maintainers; {
+    maintainers = [ aszlig worldofpeace ];
+  };
+
+  machine = { ... }: {
+    imports = [ ./common/user-account.nix ];
+    services.xserver.enable = true;
+    services.xserver.displayManager.lightdm.enable = true;
+    services.xserver.windowManager.default = "icewm";
+    services.xserver.windowManager.icewm.enable = true;
+    services.xserver.desktopManager.default = "none";
+  };
+
+  enableOCR = true;
+
+  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 ");
+  '';
+})