at 23.11-pre 1.8 kB view raw
1import ./make-test-python.nix ({ pkgs, lib, ... }: { 2 name = "mate"; 3 4 meta = { 5 maintainers = lib.teams.mate.members; 6 }; 7 8 nodes.machine = { ... }: { 9 imports = [ 10 ./common/user-account.nix 11 ]; 12 13 services.xserver.enable = true; 14 15 services.xserver.displayManager = { 16 lightdm.enable = true; 17 autoLogin = { 18 enable = true; 19 user = "alice"; 20 }; 21 }; 22 23 services.xserver.desktopManager.mate.enable = true; 24 25 # Silence log spam due to no sound drivers loaded: 26 # ALSA lib confmisc.c:855:(parse_card) cannot find card '0' 27 hardware.pulseaudio.enable = true; 28 }; 29 30 testScript = { nodes, ... }: 31 let 32 user = nodes.machine.users.users.alice; 33 in 34 '' 35 with subtest("Wait for login"): 36 machine.wait_for_x() 37 machine.wait_for_file("${user.home}/.Xauthority") 38 machine.succeed("xauth merge ${user.home}/.Xauthority") 39 40 with subtest("Check that logging in has given the user ownership of devices"): 41 machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") 42 43 with subtest("Check if MATE session components actually start"): 44 machine.wait_until_succeeds("pgrep marco") 45 machine.wait_for_window("marco") 46 machine.wait_until_succeeds("pgrep mate-panel") 47 machine.wait_for_window("Top Panel") 48 machine.wait_for_window("Bottom Panel") 49 machine.wait_until_succeeds("pgrep caja") 50 machine.wait_for_window("Caja") 51 52 with subtest("Open MATE terminal"): 53 machine.succeed("su - ${user.name} -c 'DISPLAY=:0.0 mate-terminal >&2 &'") 54 machine.wait_for_window("Terminal") 55 machine.sleep(20) 56 machine.screenshot("screen") 57 ''; 58})