nixos/tests: fix tests that use SDDM
Newer versions of SDDM moved the Xauth cookie from /tmp to $XDG_RUNTIME_DIR, so update tests accordingly. Also, add a delay before reading the cookie, as SDDM does not create the file atomically, so it's possible we try to read it before the cookie is actually written.
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
with subtest("Wait for login"):
|
||||
machine.wait_for_x()
|
||||
machine.wait_for_file("/tmp/xauth_*")
|
||||
machine.sleep(1)
|
||||
machine.succeed("xauth merge /tmp/xauth_*")
|
||||
machine.succeed("su - ${user.name} -c 'xauth merge /tmp/xauth_*'")
|
||||
|
||||
|
||||
@@ -70,8 +70,9 @@
|
||||
|
||||
with subtest("GUI"):
|
||||
gui.wait_for_x()
|
||||
gui.wait_for_file("/tmp/xauth_*")
|
||||
gui.succeed("xauth merge /tmp/xauth_*")
|
||||
gui.wait_for_file("/run/user/1000/xauth_*")
|
||||
gui.sleep(1)
|
||||
gui.succeed("xauth merge /run/user/1000/xauth_*")
|
||||
gui.wait_for_window("^Desktop ")
|
||||
gui.wait_for_unit("maestral.service", "${user.name}")
|
||||
'';
|
||||
|
||||
@@ -32,8 +32,10 @@
|
||||
''
|
||||
with subtest("Wait for login"):
|
||||
start_all()
|
||||
machine.wait_for_file("/tmp/xauth_*")
|
||||
machine.succeed("xauth merge /tmp/xauth_*")
|
||||
machine.wait_for_file("/run/user/1000/xauth_*")
|
||||
machine.sleep(1)
|
||||
machine.succeed("xauth merge /run/user/1000/xauth_*")
|
||||
machine.succeed("su - ${user.name} -c 'xauth merge /run/user/1000/xauth_*'")
|
||||
|
||||
with subtest("Check plasmashell started"):
|
||||
machine.wait_until_succeeds("pgrep plasmashell")
|
||||
@@ -45,8 +47,6 @@
|
||||
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")
|
||||
|
||||
@@ -35,8 +35,9 @@
|
||||
''
|
||||
with subtest("Wait for login"):
|
||||
start_all()
|
||||
machine.wait_for_file("/tmp/xauth_*")
|
||||
machine.succeed("xauth merge /tmp/xauth_*")
|
||||
machine.wait_for_file("/run/sddm/xauth_*")
|
||||
machine.sleep(1)
|
||||
machine.succeed("xauth merge /run/sddm/xauth_*")
|
||||
|
||||
with subtest("Check RetroArch started"):
|
||||
machine.wait_until_succeeds("pgrep retroarch")
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
machine.screenshot("sddm")
|
||||
machine.send_chars("${user.password}\n")
|
||||
machine.wait_for_file("/tmp/xauth_*")
|
||||
machine.sleep(1)
|
||||
machine.succeed("xauth merge /tmp/xauth_*")
|
||||
machine.wait_for_window("^IceWM ")
|
||||
'';
|
||||
@@ -54,6 +55,7 @@
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_file("/tmp/xauth_*")
|
||||
machine.sleep(1)
|
||||
machine.succeed("xauth merge /tmp/xauth_*")
|
||||
machine.wait_for_window("^IceWM ")
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user