From 7c2becf742a58b7ed60fe9cef0488d879add64bc Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sun, 19 Jan 2025 12:40:45 +0100 Subject: [PATCH] nixosTests.miracle-wm: Move the mouse to work around VM setup issues --- nixos/tests/miracle-wm.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nixos/tests/miracle-wm.nix b/nixos/tests/miracle-wm.nix index 96df8bb434b6..bc346a156815 100644 --- a/nixos/tests/miracle-wm.nix +++ b/nixos/tests/miracle-wm.nix @@ -22,6 +22,8 @@ user = "alice"; }; + programs.ydotool.enable = true; + services.xserver.enable = true; services.displayManager.defaultSession = lib.mkForce "miracle-wm"; @@ -114,7 +116,17 @@ machine.wait_for_file("/tmp/test-wayland-exit-ok") machine.copy_from_vm("/tmp/test-wayland.out") machine.screenshot("foot_wayland_info") + + # please actually register that we want to close the window + machine.succeed("ydotool mousemove -- 10 10") + machine.sleep(3) + machine.send_chars("exit\n") + + # please actually register that we want to close the window + machine.succeed("ydotool mousemove -- 10 10") + machine.sleep(3) + machine.wait_until_fails("pgrep foot") # Test XWayland @@ -125,7 +137,17 @@ machine.wait_for_file("/tmp/test-x11-exit-ok") machine.copy_from_vm("/tmp/test-x11.out") machine.screenshot("alacritty_glinfo") + + # please actually register that we want to close the window + machine.succeed("ydotool mousemove -- 10 10") + machine.sleep(3) + machine.send_chars("exit\n") + + # please actually register that we want to close the window + machine.succeed("ydotool mousemove -- 10 10") + machine.sleep(3) + machine.wait_until_fails("pgrep alacritty") ''; }