git.iko.soy/typeable/nixpkgs
on master help sign in
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>

commitd22b6fb10f30a65583deafa39eeb4f1285f1209b authoraszlig <aszlig@redmoonstudios.org> dateWed 27 May 2015, 18:13 (12 years ago) parent5e5eaf0
1 file changed+25
nixos/tests/lightdm.nix+25
nixos/tests/lightdm.nixnew file+25
@@ -0,0 +1,25 @@
1+import ./make-test.nix {
2+ name = "lightdm";
3+
4+ machine = { lib, ... }: {
5+ imports = [ ./common/user-account.nix ];
6+ services.xserver.enable = true;
7+ services.xserver.displayManager.lightdm.enable = true;
8+ services.xserver.windowManager.default = "icewm";
9+ services.xserver.windowManager.icewm.enable = true;
10+ services.xserver.desktopManager.default = "none";
11+ };
12+
13+ enableOCR = true;
14+
15+ testScript = { nodes, ... }: let
16+ user = nodes.machine.config.users.extraUsers.alice;
17+ in ''
18+ startAll;
19+ $machine->waitForText(qr/${user.description}/);
20+ $machine->screenshot("lightdm");
21+ $machine->sendChars("${user.password}\n");
22+ $machine->waitForText(qr/^\d{2}(?::\d{2}){2} (?:AM|PM)$/m);
23+ $machine->screenshot("session");
24+ '';
25+}