nixpkgs/nixos/tests/plasma5-systemd-start.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.1 KiB
Nix
Raw Normal View History

2021-10-31 20:34:10 +00:00
import ./make-test-python.nix ({ pkgs, ...} :
{
name = "plasma5-systemd-start";
meta = with pkgs.lib.maintainers; {
maintainers = [ oxalica ];
};
2022-03-20 23:15:30 +00:00
nodes.machine = { ... }:
2021-10-31 20:34:10 +00:00
{
imports = [ ./common/user-account.nix ];
services.xserver = {
enable = true;
displayManager.sddm.enable = true;
displayManager.defaultSession = "plasma";
desktopManager.plasma5.enable = true;
desktopManager.plasma5.runUsingSystemd = true;
displayManager.autoLogin = {
enable = true;
user = "alice";
};
};
};
testScript = { nodes, ... }: ''
2021-10-31 20:34:10 +00:00
with subtest("Wait for login"):
start_all()
machine.wait_for_file("/tmp/xauth_*")
machine.succeed("xauth merge /tmp/xauth_*")
2021-10-31 20:34:10 +00:00
with subtest("Check plasmashell started"):
machine.wait_until_succeeds("pgrep plasmashell")
machine.wait_for_window("^Desktop ")
status, result = machine.systemctl('--no-pager show plasma-plasmashell.service', user='alice')
assert status == 0, 'Service not found'
assert 'ActiveState=active' in result.split('\n'), 'Systemd service not active'
'';
})