at 25.11-pre 1.3 kB view raw
1import ./make-test-python.nix ( 2 { pkgs, ... }: 3 4 { 5 name = "plasma5-systemd-start"; 6 meta = with pkgs.lib.maintainers; { 7 maintainers = [ oxalica ]; 8 }; 9 10 nodes.machine = 11 { ... }: 12 13 { 14 imports = [ ./common/user-account.nix ]; 15 services.xserver = { 16 enable = true; 17 desktopManager.plasma5.enable = true; 18 desktopManager.plasma5.runUsingSystemd = true; 19 }; 20 21 services.displayManager = { 22 sddm.enable = true; 23 defaultSession = "plasma"; 24 autoLogin = { 25 enable = true; 26 user = "alice"; 27 }; 28 }; 29 }; 30 31 testScript = 32 { nodes, ... }: 33 '' 34 with subtest("Wait for login"): 35 start_all() 36 machine.wait_for_file("/tmp/xauth_*") 37 machine.succeed("xauth merge /tmp/xauth_*") 38 39 with subtest("Check plasmashell started"): 40 machine.wait_until_succeeds("pgrep plasmashell") 41 machine.wait_for_window("^Desktop ") 42 43 status, result = machine.systemctl('--no-pager show plasma-plasmashell.service', user='alice') 44 assert status == 0, 'Service not found' 45 assert 'ActiveState=active' in result.split('\n'), 'Systemd service not active' 46 ''; 47 } 48)