mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
Merge pull request #246743 from bobby285271/fix/wait-for-x
nixos/tests/{budgie,gnome-flashback}: unbreak
This commit is contained in:
commit
58a421640c
@ -32,7 +32,15 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
in
|
||||
''
|
||||
with subtest("Wait for login"):
|
||||
machine.wait_for_x()
|
||||
# wait_for_x() checks graphical-session.target, which is expected to be
|
||||
# inactive on Budgie before #228946 (i.e. systemd managed gnome-session) is
|
||||
# done on upstream.
|
||||
# https://github.com/BuddiesOfBudgie/budgie-desktop/blob/v10.7.2/src/session/budgie-desktop.in#L16
|
||||
#
|
||||
# Previously this was unconditionally touched by xsessionWrapper but was
|
||||
# changed in #233981 (we have Budgie:GNOME in XDG_CURRENT_DESKTOP).
|
||||
# machine.wait_for_x()
|
||||
machine.wait_until_succeeds('journalctl -t gnome-session-binary --grep "Entering running state"')
|
||||
machine.wait_for_file("${user.home}/.Xauthority")
|
||||
machine.succeed("xauth merge ${user.home}/.Xauthority")
|
||||
|
||||
|
@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
|
||||
|
||||
nodes.machine = { nodes, ... }:
|
||||
let
|
||||
user = nodes.machine.config.users.users.alice;
|
||||
user = nodes.machine.users.users.alice;
|
||||
in
|
||||
|
||||
{ imports = [ ./common/user-account.nix ];
|
||||
@ -27,12 +27,20 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: let
|
||||
user = nodes.machine.config.users.users.alice;
|
||||
user = nodes.machine.users.users.alice;
|
||||
uid = toString user.uid;
|
||||
xauthority = "/run/user/${uid}/gdm/Xauthority";
|
||||
in ''
|
||||
with subtest("Login to GNOME Flashback with GDM"):
|
||||
machine.wait_for_x()
|
||||
# wait_for_x() checks graphical-session.target, which is expected to be
|
||||
# inactive on gnome-flashback before #228946 (i.e. systemd managed
|
||||
# gnome-session) is done.
|
||||
# https://github.com/NixOS/nixpkgs/pull/208060
|
||||
#
|
||||
# Previously this was unconditionally touched by xsessionWrapper but was
|
||||
# changed in #233981 (we have GNOME-Flashback:GNOME in XDG_CURRENT_DESKTOP).
|
||||
# machine.wait_for_x()
|
||||
machine.wait_until_succeeds('journalctl -t gnome-session-binary --grep "Entering running state"')
|
||||
# Wait for alice to be logged in"
|
||||
machine.wait_for_unit("default.target", "${user.name}")
|
||||
machine.wait_for_file("${xauthority}")
|
||||
|
Loading…
Reference in New Issue
Block a user