nixos/tests: adjust everything I missed for sddm update

Also clean up a few warnings while we're at it.
This commit is contained in:
K900 2023-07-09 18:12:27 +03:00
parent b840c45d39
commit 2fc57ae670
5 changed files with 18 additions and 22 deletions

View file

@ -52,7 +52,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
testScript = { nodes, ... }: testScript = { nodes, ... }:
let let
user = nodes.cli.config.users.users.alice; user = nodes.cli.users.users.alice;
in in
'' ''
start_all() start_all()
@ -65,7 +65,8 @@ import ./make-test-python.nix ({ pkgs, ... }: {
with subtest("GUI"): with subtest("GUI"):
gui.wait_for_x() gui.wait_for_x()
gui.succeed("xauth merge ${user.home}/.Xauthority") gui.wait_for_file("/tmp/xauth_*")
gui.succeed("xauth merge /tmp/xauth_*")
gui.wait_for_window("^Desktop ") gui.wait_for_window("^Desktop ")
gui.wait_for_unit("maestral.service", "${user.name}") gui.wait_for_unit("maestral.service", "${user.name}")
''; '';

View file

@ -22,14 +22,11 @@ import ./make-test-python.nix ({ pkgs, ...} :
users.users.alice.extraGroups = ["uinput"]; users.users.alice.extraGroups = ["uinput"];
}; };
testScript = { nodes, ... }: let testScript = { nodes, ... }: ''
user = nodes.machine.users.users.alice;
xdo = "${pkgs.xdotool}/bin/xdotool";
in ''
with subtest("Wait for login"): with subtest("Wait for login"):
start_all() start_all()
machine.wait_for_file("${user.home}/.Xauthority") machine.wait_for_file("/tmp/xauth_*")
machine.succeed("xauth merge ${user.home}/.Xauthority") machine.succeed("xauth merge /tmp/xauth_*")
with subtest("Check plasmashell started"): with subtest("Check plasmashell started"):
machine.wait_until_succeeds("pgrep plasmashell") machine.wait_until_succeeds("pgrep plasmashell")

View file

@ -23,13 +23,11 @@ import ./make-test-python.nix ({ pkgs, ...} :
}; };
}; };
testScript = { nodes, ... }: let testScript = { nodes, ... }: ''
user = nodes.machine.config.users.users.alice;
in ''
with subtest("Wait for login"): with subtest("Wait for login"):
start_all() start_all()
machine.wait_for_file("${user.home}/.Xauthority") machine.wait_for_file("/tmp/xauth_*")
machine.succeed("xauth merge ${user.home}/.Xauthority") machine.succeed("xauth merge /tmp/xauth_*")
with subtest("Check plasmashell started"): with subtest("Check plasmashell started"):
machine.wait_until_succeeds("pgrep plasmashell") machine.wait_until_succeeds("pgrep plasmashell")

View file

@ -13,10 +13,8 @@ import ./make-test-python.nix ({ pkgs, ...} :
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true; services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.defaultSession = "plasma"; services.xserver.displayManager.defaultSession = "plasma";
services.xserver.desktopManager.plasma5 = { services.xserver.desktopManager.plasma5.enable = true;
enable = true; environment.plasma5.excludePackages = [ pkgs.plasma5Packages.elisa ];
excludePackages = [ pkgs.plasma5Packages.elisa ];
};
services.xserver.displayManager.autoLogin = { services.xserver.displayManager.autoLogin = {
enable = true; enable = true;
user = "alice"; user = "alice";
@ -25,13 +23,13 @@ import ./make-test-python.nix ({ pkgs, ...} :
}; };
testScript = { nodes, ... }: let testScript = { nodes, ... }: let
user = nodes.machine.config.users.users.alice; user = nodes.machine.users.users.alice;
xdo = "${pkgs.xdotool}/bin/xdotool"; xdo = "${pkgs.xdotool}/bin/xdotool";
in '' in ''
with subtest("Wait for login"): with subtest("Wait for login"):
start_all() start_all()
machine.wait_for_file("${user.home}/.Xauthority") machine.wait_for_file("/tmp/xauth_*")
machine.succeed("xauth merge ${user.home}/.Xauthority") machine.succeed("xauth merge /tmp/xauth_*")
with subtest("Check plasmashell started"): with subtest("Check plasmashell started"):
machine.wait_until_succeeds("pgrep plasmashell") machine.wait_until_succeeds("pgrep plasmashell")
@ -46,6 +44,8 @@ import ./make-test-python.nix ({ pkgs, ...} :
with subtest("Ensure Elisa is not installed"): with subtest("Ensure Elisa is not installed"):
machine.fail("which elisa") machine.fail("which elisa")
machine.succeed("su - ${user.name} -c 'xauth merge /tmp/xauth_*'")
with subtest("Run Dolphin"): with subtest("Run Dolphin"):
machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin >&2 &'") machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin >&2 &'")
machine.wait_for_window(" Dolphin") machine.wait_for_window(" Dolphin")

View file

@ -30,8 +30,8 @@ import ./make-test-python.nix ({ pkgs, ... }:
in '' in ''
with subtest("Wait for login"): with subtest("Wait for login"):
start_all() start_all()
machine.wait_for_file("${user.home}/.Xauthority") machine.wait_for_file("/tmp/xauth_*")
machine.succeed("xauth merge ${user.home}/.Xauthority") machine.succeed("xauth merge /tmp/xauth_*")
with subtest("Check RetroArch started"): with subtest("Check RetroArch started"):
machine.wait_until_succeeds("pgrep retroarch") machine.wait_until_succeeds("pgrep retroarch")