8282 machine.wait_for_unit("multi-user.target")
8383 # Startup Hyprland as the test compositor for hyprlock
8484 print("Running Hyprland")
85- _, __ = machine.execute("systemd-run -q -u hyprland --uid $(id -u alice) -p RuntimeMaxSec=60 ${ envAddToSystemdRun } --setenv PATH=$PATH ${ pkgs . hyprland } /bin/Hyprland -c ${ flake . hyprlock-test-meta } /share/hypr/hyprland.conf")
86- _, __ = machine.execute("sleep 5")
85+ machine.execute("systemd-run -q -u hyprland --uid $(id -u alice) -p RuntimeMaxSec=60 ${ envAddToSystemdRun } --setenv PATH=$PATH ${ pkgs . hyprland } /bin/Hyprland -c ${ flake . hyprlock-test-meta } /share/hypr/hyprland.conf")
86+ machine.wait_for_file("/tmp/hyprland_exec_once_notification")
87+ machine.execute("sleep 1") # slack just to be save
88+
8789 _, systeminfo = machine.execute("hyprctl --instance 0 systeminfo")
8890 print(systeminfo)
8991
9496 hyprlock_cmd = f"hyprlock --config {str(hyprlock_config)} -v 2>&1 >{log_file_path}; echo $? > /tmp/exit_status"
9597 if ${ APITRACE_RECORD_PY } :
9698 hyprlock_cmd = f"${ lib . getExe' pkgs . apitrace "apitrace" } trace --output {log_file_path}.trace --api egl {hyprlock_cmd}"
97- _, __ = machine.execute(f"hyprctl --instance 0 dispatch exec '{hyprlock_cmd}'")
99+ machine.execute(f"hyprctl --instance 0 dispatch exec '{hyprlock_cmd}'")
98100
99101 wait_for_lock_exit_status, out = machine.execute("WAYLAND_DISPLAY=wayland-1 ${ flake . hyprlock-test-meta } /bin/wait-for-lock")
100102 print(f"Wait for lock exit code: {wait_for_lock_exit_status}")
107109 # wrong password
108110 machine.send_chars("asdf\n")
109111
110- _, __ = machine.execute("sleep 3") # default fail_timeout is 2 seconds
112+ machine.execute("sleep 3") # default fail_timeout is 2 seconds
111113
112114 # correct password
113115 machine.send_chars("abcdefghijklmnopqrstuvwxyz1234567890-=!@#$%^&*()_+[]{};':\"]\\|,./<>?`~")
@@ -126,13 +128,13 @@ in {
126128 machine.send_key("z")
127129 machine.send_chars("\n")
128130
129- _, __ = machine.execute(f"waitpid {hyprlock_pid}")
131+ machine.execute(f"waitpid {hyprlock_pid}")
130132 _, exit_status = machine.execute("cat /tmp/exit_status")
131133 print(f"Hyprlock exited with {exit_status}")
132134
133- machine.copy_from_vm(log_file_path)
135+ machine.copy_from_vm(log_file_path, "logs" )
134136 if ${ APITRACE_RECORD_PY } :
135- machine.copy_from_vm(log_file_path + ".trace")
137+ machine.copy_from_vm(log_file_path + ".trace", "traces" )
136138
137139 _, out = machine.execute(f"cat {log_file_path}")
138140 print(f"Hyprlock log:\n{out}")
0 commit comments