nixos/sddm: test automatic and manual login
This commit is contained in:
parent
5dbbb60d4f
commit
352e335f3d
@ -92,7 +92,7 @@ in rec {
|
|||||||
(all nixos.tests.openssh)
|
(all nixos.tests.openssh)
|
||||||
(all nixos.tests.printing)
|
(all nixos.tests.printing)
|
||||||
(all nixos.tests.proxy)
|
(all nixos.tests.proxy)
|
||||||
(all nixos.tests.sddm)
|
(all nixos.tests.sddm.default)
|
||||||
(all nixos.tests.simple)
|
(all nixos.tests.simple)
|
||||||
(all nixos.tests.udisks2)
|
(all nixos.tests.udisks2)
|
||||||
(all nixos.tests.xfce)
|
(all nixos.tests.xfce)
|
||||||
|
@ -296,7 +296,7 @@ in rec {
|
|||||||
tests.quake3 = callTest tests/quake3.nix {};
|
tests.quake3 = callTest tests/quake3.nix {};
|
||||||
tests.runInMachine = callTest tests/run-in-machine.nix {};
|
tests.runInMachine = callTest tests/run-in-machine.nix {};
|
||||||
tests.samba = callTest tests/samba.nix {};
|
tests.samba = callTest tests/samba.nix {};
|
||||||
tests.sddm = callTest tests/sddm.nix {};
|
tests.sddm = callSubTests tests/sddm.nix {};
|
||||||
tests.simple = callTest tests/simple.nix {};
|
tests.simple = callTest tests/simple.nix {};
|
||||||
tests.smokeping = callTest tests/smokeping.nix {};
|
tests.smokeping = callTest tests/smokeping.nix {};
|
||||||
tests.taskserver = callTest tests/taskserver.nix {};
|
tests.taskserver = callTest tests/taskserver.nix {};
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
{ system ? builtins.currentSystem }:
|
||||||
|
|
||||||
|
with import ../lib/testing.nix { inherit system; };
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
tests = {
|
||||||
|
default = {
|
||||||
name = "sddm";
|
name = "sddm";
|
||||||
|
|
||||||
machine = { lib, ... }: {
|
machine = { lib, ... }: {
|
||||||
@ -23,4 +31,36 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||||||
$machine->succeed("xauth merge ~alice/.Xauthority");
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
$machine->waitForWindow("^IceWM ");
|
$machine->waitForWindow("^IceWM ");
|
||||||
'';
|
'';
|
||||||
})
|
};
|
||||||
|
|
||||||
|
autoLogin = {
|
||||||
|
name = "sddm-autologin";
|
||||||
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
|
maintainers = [ ttuegel ];
|
||||||
|
};
|
||||||
|
|
||||||
|
machine = { lib, ... }: {
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = { nodes, ... }: ''
|
||||||
|
startAll;
|
||||||
|
$machine->waitForFile("/home/alice/.Xauthority");
|
||||||
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||||
|
$machine->waitForWindow("^IceWM ");
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
lib.mapAttrs (lib.const makeTest) tests
|
||||||
|
Loading…
Reference in New Issue
Block a user