nixos/tests/cinnamon: Check for xdg-desktop-portal

xdg-desktop-portal.service is part of graphical-session.target.
This commit is contained in:
Bobby Rong
2026-06-21 15:54:28 +08:00
parent a8f1842cbb
commit 514e39c3ca
2 changed files with 14 additions and 4 deletions
+7 -2
View File
@@ -51,8 +51,9 @@
machine.wait_until_succeeds("${eval "Main.runState"} | grep -q 'true,..2'")
with subtest("Check if Cinnamon components actually start"):
for i in ["csd-media-keys", "xapp-sn-watcher", "nemo-desktop"]:
machine.wait_until_succeeds(f"pgrep -f {i}")
# https://unix.stackexchange.com/a/74186
for i in ["[c]sd-media-keys", "[x]app-sn-watcher", "[n]emo-desktop"]:
machine.wait_until_succeeds(f"pgrep -f \"{i}\"")
machine.wait_until_succeeds("journalctl -b --grep 'Loaded applet menu@cinnamon.org'")
machine.wait_until_succeeds("journalctl -b --grep 'calendar@cinnamon.org: Calendar events supported'")
@@ -84,6 +85,10 @@
machine.wait_until_succeeds("${eval "global.display.focus_window.wm_class"} | grep -i 'gnome-terminal'")
machine.sleep(2)
# Only can be tested after opening the above apps.
with subtest("Check if x-d-p actually starts"):
machine.wait_until_succeeds("pgrep -xf \"${pkgs.xdg-desktop-portal}/libexec/xdg-desktop-portal\"")
with subtest("Check if Cinnamon has ever coredumped"):
machine.fail("coredumpctl --json=short | grep -E 'cinnamon|nemo'")
'';
+7 -2
View File
@@ -62,8 +62,9 @@
machine.wait_until_succeeds("${eval "Main.runState"} | grep -q 'true,..2'")
with subtest("Check if Cinnamon components actually start"):
for i in ["csd-media-keys", "cinnamon-killer-daemon", "xapp-sn-watcher", "nemo-desktop"]:
machine.wait_until_succeeds(f"pgrep -f {i}")
# https://unix.stackexchange.com/a/74186
for i in ["[c]sd-media-keys", "[c]innamon-killer-daemon", "[x]app-sn-watcher", "[n]emo-desktop"]:
machine.wait_until_succeeds(f"pgrep -f \"{i}\"")
machine.wait_until_succeeds("journalctl -b --grep 'Loaded applet menu@cinnamon.org'")
machine.wait_until_succeeds("journalctl -b --grep 'calendar@cinnamon.org: Calendar events supported'")
@@ -104,6 +105,10 @@
machine.sleep(2)
machine.screenshot("cinnamon_virtual_keyboard")
# Only can be tested after opening the above apps.
with subtest("Check if x-d-p actually starts"):
machine.wait_until_succeeds("pgrep -xf \"${pkgs.xdg-desktop-portal}/libexec/xdg-desktop-portal\"")
with subtest("Check if Cinnamon has ever coredumped"):
machine.fail("coredumpctl --json=short | grep -E 'cinnamon|nemo'")
'';