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