at 25.11-pre 2.6 kB view raw
1import ./make-test-python.nix ( 2 { pkgs, lib, ... }: 3 { 4 name = "mate-wayland"; 5 6 meta.maintainers = lib.teams.mate.members; 7 8 nodes.machine = 9 { ... }: 10 { 11 imports = [ 12 ./common/user-account.nix 13 ]; 14 15 services.xserver.enable = true; 16 services.displayManager = { 17 sddm.enable = true; # https://github.com/canonical/lightdm/issues/63 18 sddm.wayland.enable = true; 19 defaultSession = "MATE"; 20 autoLogin = { 21 enable = true; 22 user = "alice"; 23 }; 24 }; 25 services.xserver.desktopManager.mate.enableWaylandSession = true; 26 27 # Need to switch to a different GPU driver than the default one (-vga std) so that wayfire can launch: 28 virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ]; 29 }; 30 31 enableOCR = true; 32 33 testScript = 34 { nodes, ... }: 35 let 36 user = nodes.machine.users.users.alice; 37 in 38 '' 39 machine.wait_for_unit("display-manager.service") 40 41 with subtest("Wait for Wayland server"): 42 machine.wait_for_file("/run/user/${toString user.uid}/wayland-1") 43 44 with subtest("Check if MATE session components actually start"): 45 for i in ["wayfire", "mate-panel", "mate-wayland.sh"]: 46 machine.wait_until_succeeds(f"pgrep {i}") 47 machine.wait_until_succeeds("pgrep -f mate-wayland-components.sh") 48 # It is expected that WorkspaceSwitcherApplet doesn't work in Wayland 49 machine.wait_for_text('(panel|Factory|Workspace|Switcher|Applet|configuration)') 50 51 with subtest("Check if various environment variables are set"): 52 cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf mate-panel)/environ" 53 machine.succeed(f"{cmd} | grep 'XDG_SESSION_TYPE' | grep 'wayland'") 54 machine.succeed(f"{cmd} | grep 'XDG_SESSION_DESKTOP' | grep 'MATE'") 55 machine.succeed(f"{cmd} | grep 'MATE_PANEL_APPLETS_DIR' | grep '${pkgs.mate.mate-panel-with-applets.pname}'") 56 57 with subtest("Check if Wayfire config is properly configured"): 58 for i in ["button_style = mate", "firedecor", "mate-wayland-components.sh"]: 59 machine.wait_until_succeeds(f"cat /home/${user.name}/.config/mate/wayfire.ini | grep '{i}'") 60 61 with subtest("Check if Wayfire has ever coredumped"): 62 machine.fail("coredumpctl --json=short | grep wayfire") 63 machine.sleep(10) 64 machine.screenshot("screen") 65 ''; 66 } 67)