2018-11-11 09:41:11 +01:00
|
|
|
{ system ? builtins.currentSystem,
|
|
|
|
config ? {},
|
|
|
|
pkgs ? import ../.. { inherit system config; }
|
|
|
|
}:
|
2017-03-24 16:38:16 +01:00
|
|
|
|
2019-11-07 02:55:18 +01:00
|
|
|
with import ../lib/testing-python.nix { inherit system pkgs; };
|
2017-03-24 16:38:16 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
|
|
|
tests = {
|
|
|
|
default = {
|
|
|
|
name = "sddm";
|
|
|
|
|
2018-07-20 22:56:59 +02:00
|
|
|
machine = { ... }: {
|
2017-03-24 16:38:16 +01: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 19:48:37 +01:00
|
|
|
|
2017-03-24 16:38:16 +01:00
|
|
|
enableOCR = true;
|
|
|
|
|
|
|
|
testScript = { nodes, ... }: let
|
2018-06-30 01:55:42 +02:00
|
|
|
user = nodes.machine.config.users.users.alice;
|
2017-03-24 16:38:16 +01:00
|
|
|
in ''
|
2019-11-07 02:55:18 +01:00
|
|
|
start_all()
|
2019-11-12 18:46:02 +01:00
|
|
|
machine.wait_for_text("(?i)select your user")
|
2019-11-07 02:55:18 +01:00
|
|
|
machine.screenshot("sddm")
|
|
|
|
machine.send_chars("${user.password}\n")
|
|
|
|
machine.wait_for_file("${user.home}/.Xauthority")
|
|
|
|
machine.succeed("xauth merge ${user.home}/.Xauthority")
|
|
|
|
machine.wait_for_window("^IceWM ")
|
2017-03-24 16:38:16 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
autoLogin = {
|
|
|
|
name = "sddm-autologin";
|
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
|
|
maintainers = [ ttuegel ];
|
|
|
|
};
|
|
|
|
|
2018-07-20 22:56:59 +02:00
|
|
|
machine = { ... }: {
|
2017-03-24 16:38:16 +01: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";
|
|
|
|
};
|
|
|
|
|
2019-11-07 02:55:18 +01:00
|
|
|
testScript = { nodes, ... }: let
|
|
|
|
user = nodes.machine.config.users.users.alice;
|
|
|
|
in ''
|
|
|
|
start_all()
|
|
|
|
machine.wait_for_file("${user.home}/.Xauthority")
|
|
|
|
machine.succeed("xauth merge ${user.home}/.Xauthority")
|
|
|
|
machine.wait_for_window("^IceWM ")
|
2017-03-24 16:38:16 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.mapAttrs (lib.const makeTest) tests
|