2023-02-17 02:48:02 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
|
|
|
name = "budgie";
|
|
|
|
|
2023-04-30 02:17:04 +01:00
|
|
|
meta.maintainers = [ lib.maintainers.federicoschonborn ];
|
2023-02-17 02:48:02 +00:00
|
|
|
|
|
|
|
nodes.machine = { ... }: {
|
|
|
|
imports = [
|
|
|
|
./common/user-account.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
|
|
|
services.xserver.displayManager = {
|
|
|
|
lightdm.enable = true;
|
|
|
|
autoLogin = {
|
|
|
|
enable = true;
|
|
|
|
user = "alice";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-04-22 01:32:01 +01:00
|
|
|
services.xserver.desktopManager.budgie = {
|
|
|
|
enable = true;
|
|
|
|
extraPlugins = [
|
2023-05-12 00:45:45 +01:00
|
|
|
pkgs.budgiePlugins.budgie-analogue-clock-applet
|
2023-04-22 01:32:01 +01:00
|
|
|
];
|
|
|
|
};
|
2023-02-17 02:48:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript = { nodes, ... }:
|
|
|
|
let
|
|
|
|
user = nodes.machine.users.users.alice;
|
|
|
|
in
|
|
|
|
''
|
|
|
|
with subtest("Wait for login"):
|
2023-08-02 09:56:26 +01:00
|
|
|
# wait_for_x() checks graphical-session.target, which is expected to be
|
2024-01-28 08:10:44 +00:00
|
|
|
# inactive on Budgie before Budgie manages user session with systemd.
|
|
|
|
# https://github.com/BuddiesOfBudgie/budgie-desktop/blob/39e9f0895c978f76/src/session/budgie-desktop.in#L16
|
2023-08-02 09:56:26 +01:00
|
|
|
#
|
|
|
|
# Previously this was unconditionally touched by xsessionWrapper but was
|
|
|
|
# changed in #233981 (we have Budgie:GNOME in XDG_CURRENT_DESKTOP).
|
|
|
|
# machine.wait_for_x()
|
2024-01-28 08:10:44 +00:00
|
|
|
machine.wait_until_succeeds('journalctl -t budgie-session-binary --grep "Entering running state"')
|
2023-02-17 02:48:02 +00:00
|
|
|
machine.wait_for_file("${user.home}/.Xauthority")
|
|
|
|
machine.succeed("xauth merge ${user.home}/.Xauthority")
|
|
|
|
|
|
|
|
with subtest("Check that logging in has given the user ownership of devices"):
|
|
|
|
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
|
|
|
|
|
|
|
|
with subtest("Check if Budgie session components actually start"):
|
|
|
|
machine.wait_until_succeeds("pgrep budgie-daemon")
|
|
|
|
machine.wait_for_window("budgie-daemon")
|
|
|
|
machine.wait_until_succeeds("pgrep budgie-panel")
|
|
|
|
machine.wait_for_window("budgie-panel")
|
2023-08-16 16:06:50 +01:00
|
|
|
# We don't check xwininfo for this one.
|
|
|
|
# See https://github.com/NixOS/nixpkgs/pull/216737#discussion_r1155312754
|
|
|
|
machine.wait_until_succeeds("pgrep budgie-wm")
|
2023-02-17 02:48:02 +00:00
|
|
|
|
|
|
|
with subtest("Open MATE terminal"):
|
|
|
|
machine.succeed("su - ${user.name} -c 'DISPLAY=:0 mate-terminal >&2 &'")
|
|
|
|
machine.wait_for_window("Terminal")
|
2023-08-16 16:06:50 +01:00
|
|
|
|
|
|
|
with subtest("Check if budgie-wm has ever coredumped"):
|
|
|
|
machine.fail("coredumpctl --json=short | grep budgie-wm")
|
2023-02-17 02:48:02 +00:00
|
|
|
machine.sleep(20)
|
|
|
|
machine.screenshot("screen")
|
|
|
|
'';
|
|
|
|
})
|