From d777e99f6a48223cc5bfd4529d6608e5ba104ddb Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sun, 19 Jan 2025 12:40:30 +0100 Subject: [PATCH] nixosTests.miriway: Move the mouse to work around VM setup issues --- nixos/tests/miriway.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nixos/tests/miriway.nix b/nixos/tests/miriway.nix index 9ed962f572b1..012def1c4510 100644 --- a/nixos/tests/miriway.nix +++ b/nixos/tests/miriway.nix @@ -23,6 +23,8 @@ import ./make-test-python.nix ( user = "alice"; }; + programs.ydotool.enable = true; + services.xserver.enable = true; services.displayManager.defaultSession = lib.mkForce "miriway"; @@ -109,7 +111,17 @@ import ./make-test-python.nix ( 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 @@ -119,7 +131,17 @@ import ./make-test-python.nix ( 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") ''; }