nixosTests.sddm: handleTest -> runTest (#423698)
This commit is contained in:
commit
8210e5043c
@ -1265,7 +1265,7 @@ in
|
|||||||
scion-freestanding-deployment = handleTest ./scion/freestanding-deployment { };
|
scion-freestanding-deployment = handleTest ./scion/freestanding-deployment { };
|
||||||
scrutiny = runTest ./scrutiny.nix;
|
scrutiny = runTest ./scrutiny.nix;
|
||||||
scx = runTest ./scx/default.nix;
|
scx = runTest ./scx/default.nix;
|
||||||
sddm = handleTest ./sddm.nix { };
|
sddm = import ./sddm.nix { inherit runTest; };
|
||||||
sdl3 = runTest ./sdl3.nix;
|
sdl3 = runTest ./sdl3.nix;
|
||||||
seafile = runTest ./seafile.nix;
|
seafile = runTest ./seafile.nix;
|
||||||
searx = runTest ./searx.nix;
|
searx = runTest ./searx.nix;
|
||||||
|
|||||||
@ -1,77 +1,62 @@
|
|||||||
|
{ runTest }:
|
||||||
{
|
{
|
||||||
system ? builtins.currentSystem,
|
default = runTest {
|
||||||
config ? { },
|
name = "sddm";
|
||||||
pkgs ? import ../.. { inherit system config; },
|
|
||||||
}:
|
|
||||||
|
|
||||||
with import ../lib/testing-python.nix { inherit system pkgs; };
|
nodes.machine = {
|
||||||
|
imports = [ ./common/user-account.nix ];
|
||||||
let
|
services.xserver.enable = true;
|
||||||
inherit (pkgs) lib;
|
services.displayManager.sddm.enable = true;
|
||||||
|
services.displayManager.defaultSession = "none+icewm";
|
||||||
tests = {
|
services.xserver.windowManager.icewm.enable = true;
|
||||||
default = {
|
|
||||||
name = "sddm";
|
|
||||||
|
|
||||||
nodes.machine =
|
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [ ./common/user-account.nix ];
|
|
||||||
services.xserver.enable = true;
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.displayManager.defaultSession = "none+icewm";
|
|
||||||
services.xserver.windowManager.icewm.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
enableOCR = true;
|
|
||||||
|
|
||||||
testScript =
|
|
||||||
{ nodes, ... }:
|
|
||||||
let
|
|
||||||
user = nodes.machine.users.users.alice;
|
|
||||||
in
|
|
||||||
''
|
|
||||||
start_all()
|
|
||||||
machine.wait_for_text("(?i)select your user")
|
|
||||||
machine.screenshot("sddm")
|
|
||||||
machine.send_chars("${user.password}\n")
|
|
||||||
machine.wait_for_file("/tmp/xauth_*")
|
|
||||||
machine.succeed("xauth merge /tmp/xauth_*")
|
|
||||||
machine.wait_for_window("^IceWM ")
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
autoLogin = {
|
enableOCR = true;
|
||||||
|
|
||||||
|
testScript =
|
||||||
|
{ nodes, ... }:
|
||||||
|
let
|
||||||
|
user = nodes.machine.users.users.alice;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
start_all()
|
||||||
|
machine.wait_for_text("(?i)select your user")
|
||||||
|
machine.screenshot("sddm")
|
||||||
|
machine.send_chars("${user.password}\n")
|
||||||
|
machine.wait_for_file("/tmp/xauth_*")
|
||||||
|
machine.succeed("xauth merge /tmp/xauth_*")
|
||||||
|
machine.wait_for_window("^IceWM ")
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
autoLogin = runTest (
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
name = "sddm-autologin";
|
name = "sddm-autologin";
|
||||||
meta = with pkgs.lib.maintainers; {
|
meta = with lib.maintainers; {
|
||||||
maintainers = [ ttuegel ];
|
maintainers = [ ttuegel ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes.machine =
|
nodes.machine = {
|
||||||
{ ... }:
|
imports = [ ./common/user-account.nix ];
|
||||||
{
|
services.xserver.enable = true;
|
||||||
imports = [ ./common/user-account.nix ];
|
services.displayManager = {
|
||||||
services.xserver.enable = true;
|
sddm.enable = true;
|
||||||
services.displayManager = {
|
autoLogin = {
|
||||||
sddm.enable = true;
|
enable = true;
|
||||||
autoLogin = {
|
user = "alice";
|
||||||
enable = true;
|
|
||||||
user = "alice";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
services.displayManager.defaultSession = "none+icewm";
|
|
||||||
services.xserver.windowManager.icewm.enable = true;
|
|
||||||
};
|
};
|
||||||
|
services.displayManager.defaultSession = "none+icewm";
|
||||||
|
services.xserver.windowManager.icewm.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
testScript =
|
testScript = ''
|
||||||
{ nodes, ... }:
|
start_all()
|
||||||
''
|
machine.wait_for_file("/tmp/xauth_*")
|
||||||
start_all()
|
machine.succeed("xauth merge /tmp/xauth_*")
|
||||||
machine.wait_for_file("/tmp/xauth_*")
|
machine.wait_for_window("^IceWM ")
|
||||||
machine.succeed("xauth merge /tmp/xauth_*")
|
'';
|
||||||
machine.wait_for_window("^IceWM ")
|
}
|
||||||
'';
|
);
|
||||||
};
|
}
|
||||||
};
|
|
||||||
in
|
|
||||||
lib.mapAttrs (lib.const makeTest) tests
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user