summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-05-27 18:13:18 +0200
committeraszlig <aszlig@redmoonstudios.org>2015-05-27 18:17:34 +0200
commitd22b6fb10f30a65583deafa39eeb4f1285f1209b (patch)
tree1fd9ba212d91c6e14d6c5ab4dc44bc4831b7097f /nixos
parent5e5eaf0fba6775eb4b4d2220418288f73aa62e60 (diff)
downloadnixpkgs-d22b6fb10f30a65583deafa39eeb4f1285f1209b.tar
nixpkgs-d22b6fb10f30a65583deafa39eeb4f1285f1209b.tar.gz
nixpkgs-d22b6fb10f30a65583deafa39eeb4f1285f1209b.tar.bz2
nixpkgs-d22b6fb10f30a65583deafa39eeb4f1285f1209b.tar.lz
nixpkgs-d22b6fb10f30a65583deafa39eeb4f1285f1209b.tar.xz
nixpkgs-d22b6fb10f30a65583deafa39eeb4f1285f1209b.tar.zst
nixpkgs-d22b6fb10f30a65583deafa39eeb4f1285f1209b.zip
nixos: Add small VM test for lightdm.
Serves as a regression test for #7902.

It's not yet referenced in release(-combined)?.nix because it will fail
until the issue is resolved. Tested successfully against libgcrypt with
libcap passed as null however.

As for the test itself, I'm not quite sure whether checking for the time
displayed by IceWM is a good idea, but we can still fix that if it turns
out to be a problem.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/lightdm.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixos/tests/lightdm.nix b/nixos/tests/lightdm.nix
new file mode 100644
index 00000000000..dba20a49dbd
--- /dev/null
+++ b/nixos/tests/lightdm.nix
@@ -0,0 +1,25 @@
+import ./make-test.nix {
+  name = "lightdm";
+
+  machine = { lib, ... }: {
+    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.extraUsers.alice;
+  in ''
+    startAll;
+    $machine->waitForText(qr/${user.description}/);
+    $machine->screenshot("lightdm");
+    $machine->sendChars("${user.password}\n");
+    $machine->waitForText(qr/^\d{2}(?::\d{2}){2} (?:AM|PM)$/m);
+    $machine->screenshot("session");
+  '';
+}