Unverified Commit 8210e504 authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

nixosTests.sddm: handleTest -> runTest (#423698)

parents a28854ce 447c8559
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1265,7 +1265,7 @@ in
  scion-freestanding-deployment = handleTest ./scion/freestanding-deployment { };
  scrutiny = runTest ./scrutiny.nix;
  scx = runTest ./scx/default.nix;
  sddm = handleTest ./sddm.nix { };
  sddm = import ./sddm.nix { inherit runTest; };
  sdl3 = runTest ./sdl3.nix;
  seafile = runTest ./seafile.nix;
  searx = runTest ./searx.nix;
+52 −67
Original line number Diff line number Diff line
{ runTest }:
{
  system ? builtins.currentSystem,
  config ? { },
  pkgs ? import ../.. { inherit system config; },
}:

with import ../lib/testing-python.nix { inherit system pkgs; };

let
  inherit (pkgs) lib;

  tests = {
    default = {
  default = runTest {
    name = "sddm";

      nodes.machine =
        { ... }:
        {
    nodes.machine = {
      imports = [ ./common/user-account.nix ];
      services.xserver.enable = true;
      services.displayManager.sddm.enable = true;
@@ -41,15 +29,15 @@ let
      '';
  };

    autoLogin = {
  autoLogin = runTest (
    { lib, ... }:
    {
      name = "sddm-autologin";
      meta = with pkgs.lib.maintainers; {
      meta = with lib.maintainers; {
        maintainers = [ ttuegel ];
      };

      nodes.machine =
        { ... }:
        {
      nodes.machine = {
        imports = [ ./common/user-account.nix ];
        services.xserver.enable = true;
        services.displayManager = {
@@ -63,15 +51,12 @@ let
        services.xserver.windowManager.icewm.enable = true;
      };

      testScript =
        { nodes, ... }:
        ''
      testScript = ''
        start_all()
        machine.wait_for_file("/tmp/xauth_*")
        machine.succeed("xauth merge /tmp/xauth_*")
        machine.wait_for_window("^IceWM ")
      '';
    };
  };
in
lib.mapAttrs (lib.const makeTest) tests
    }
  );
}