Merge pull request #242495 from K900/sddm-tests-oof

nixos/tests: adjust everything I missed for sddm update
This commit is contained in:
K900 2023-07-09 18:56:29 +03:00 committed by GitHub
commit 408c0e8c15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 22 deletions

View file

@ -52,7 +52,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
testScript = { nodes, ... }:
let
user = nodes.cli.config.users.users.alice;
user = nodes.cli.users.users.alice;
in
''
start_all()
@ -65,7 +65,8 @@ import ./make-test-python.nix ({ pkgs, ... }: {
with subtest("GUI"):
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_unit("maestral.service", "${user.name}")
'';

View file

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

View file

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

View file

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

View file

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