2018-11-11 08:41:11 +00:00
|
|
|
{ system ? builtins.currentSystem,
|
|
|
|
config ? {},
|
|
|
|
pkgs ? import ../.. { inherit system config; }
|
|
|
|
}:
|
2017-03-24 15:38:16 +00:00
|
|
|
|
2018-11-11 08:41:11 +00:00
|
|
|
with import ../lib/testing.nix { inherit system pkgs; };
|
2017-03-24 15:38:16 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
|
|
|
tests = {
|
|
|
|
default = {
|
|
|
|
name = "sddm";
|
|
|
|
|
2018-07-20 20:56:59 +00:00
|
|
|
machine = { ... }: {
|
2017-03-24 15:38:16 +00:00
|
|
|
imports = [ ./common/user-account.nix ];
|
|
|
|
services.xserver.enable = true;
|
|
|
|
services.xserver.displayManager.sddm.enable = true;
|
|
|
|
services.xserver.windowManager.default = "icewm";
|
|
|
|
services.xserver.windowManager.icewm.enable = true;
|
|
|
|
services.xserver.desktopManager.default = "none";
|
|
|
|
};
|
2015-11-22 18:48:37 +00:00
|
|
|
|
2017-03-24 15:38:16 +00:00
|
|
|
enableOCR = true;
|
|
|
|
|
|
|
|
testScript = { nodes, ... }: let
|
2018-06-29 23:55:42 +00:00
|
|
|
user = nodes.machine.config.users.users.alice;
|
2017-03-24 15:38:16 +00:00
|
|
|
in ''
|
|
|
|
startAll;
|
2017-06-22 04:25:31 +00:00
|
|
|
$machine->waitForText(qr/select your user/i);
|
2017-03-24 15:38:16 +00:00
|
|
|
$machine->screenshot("sddm");
|
|
|
|
$machine->sendChars("${user.password}\n");
|
|
|
|
$machine->waitForFile("/home/alice/.Xauthority");
|
|
|
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
|
|
|
$machine->waitForWindow("^IceWM ");
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
autoLogin = {
|
|
|
|
name = "sddm-autologin";
|
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
|
|
maintainers = [ ttuegel ];
|
|
|
|
};
|
|
|
|
|
2018-07-20 20:56:59 +00:00
|
|
|
machine = { ... }: {
|
2017-03-24 15:38:16 +00:00
|
|
|
imports = [ ./common/user-account.nix ];
|
|
|
|
services.xserver.enable = true;
|
|
|
|
services.xserver.displayManager.sddm = {
|
|
|
|
enable = true;
|
|
|
|
autoLogin = {
|
|
|
|
enable = true;
|
|
|
|
user = "alice";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.xserver.windowManager.default = "icewm";
|
|
|
|
services.xserver.windowManager.icewm.enable = true;
|
|
|
|
services.xserver.desktopManager.default = "none";
|
|
|
|
};
|
|
|
|
|
2018-07-20 20:56:59 +00:00
|
|
|
testScript = { ... }: ''
|
2017-03-24 15:38:16 +00:00
|
|
|
startAll;
|
|
|
|
$machine->waitForFile("/home/alice/.Xauthority");
|
|
|
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
|
|
|
$machine->waitForWindow("^IceWM ");
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.mapAttrs (lib.const makeTest) tests
|