From d22b6fb10f30a65583deafa39eeb4f1285f1209b Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 27 May 2015 18:13:18 +0200 Subject: [PATCH] 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 --- nixos/tests/lightdm.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 nixos/tests/lightdm.nix diff --git a/nixos/tests/lightdm.nix b/nixos/tests/lightdm.nix new file mode 100644 index 000000000000..dba20a49dbd6 --- /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"); + ''; +}