nixos/tests/pantheon: Always use `pgrep -xf`

To make sure we are e.g. starting the correct GSD.

+14 -6
+14 -6
nixos/tests/pantheon.nix
··· 75 75 machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") 76 76 77 77 with subtest("Check if Pantheon components actually start"): 78 - # We specifically check gsd-xsettings here since it is manually pulled up by gala. 79 - # https://github.com/elementary/gala/pull/2140 80 - for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "gsd-xsettings", "io.elementary.desktop.agent-polkit"]: 81 - machine.wait_until_succeeds(f"pgrep -f {i}") 82 - machine.wait_until_succeeds("pgrep -xf ${pkgs.pantheon.elementary-files}/libexec/io.elementary.files.xdg-desktop-portal") 78 + pgrep_list = [ 79 + "${pkgs.pantheon.gala}/bin/gala", 80 + "io.elementary.wingpanel", 81 + "io.elementary.dock", 82 + "${pkgs.pantheon.gnome-settings-daemon}/libexec/gsd-media-keys", 83 + # We specifically check gsd-xsettings here since it is manually pulled up by gala. 84 + # https://github.com/elementary/gala/pull/2140 85 + "${pkgs.pantheon.gnome-settings-daemon}/libexec/gsd-xsettings", 86 + "${pkgs.pantheon.pantheon-agent-polkit}/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit", 87 + "${pkgs.pantheon.elementary-files}/libexec/io.elementary.files.xdg-desktop-portal" 88 + ] 89 + for i in pgrep_list: 90 + machine.wait_until_succeeds(f"pgrep -xf {i}") 83 91 84 92 with subtest("Check if various environment variables are set"): 85 93 cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf ${pkgs.pantheon.gala}/bin/gala)/environ" ··· 93 101 machine.succeed(f"{cmd} | grep 'SSH_AUTH_SOCK' | grep 'gcr'") 94 102 95 103 with subtest("Wait for elementary videos autostart"): 96 - machine.wait_until_succeeds("pgrep -f io.elementary.videos") 104 + machine.wait_until_succeeds("pgrep -xf /run/current-system/sw/bin/io.elementary.videos") 97 105 machine.wait_for_text("No Videos Open") 98 106 machine.screenshot("videos") 99 107