From 7db3b7c28bd5e0b530b2675265fcb6adbd1b0026 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Mon, 27 Jan 2025 18:37:20 +0800 Subject: [PATCH] nixosTests.mate-wayland: Check for more text * As long as the dialog shows everything is fine, make the test less flaky. * Also use `pgrep` instead of `pgrep -f` when possible. --- nixos/tests/mate-wayland.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nixos/tests/mate-wayland.nix b/nixos/tests/mate-wayland.nix index 1e660087ec99..bf0989b2cf1d 100644 --- a/nixos/tests/mate-wayland.nix +++ b/nixos/tests/mate-wayland.nix @@ -42,10 +42,11 @@ import ./make-test-python.nix ( machine.wait_for_file("/run/user/${toString user.uid}/wayland-1") with subtest("Check if MATE session components actually start"): - for i in ["wayfire", "mate-panel", "mate-wayland.sh", "mate-wayland-components.sh"]: - machine.wait_until_succeeds(f"pgrep -f {i}") - # It is expected that this applet doesn't work in Wayland - machine.wait_for_text('WorkspaceSwitcherApplet') + for i in ["wayfire", "mate-panel", "mate-wayland.sh"]: + machine.wait_until_succeeds(f"pgrep {i}") + machine.wait_until_succeeds("pgrep -f mate-wayland-components.sh") + # It is expected that WorkspaceSwitcherApplet doesn't work in Wayland + machine.wait_for_text('(panel|Factory|Workspace|Switcher|Applet|configuration)') with subtest("Check if various environment variables are set"): cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf mate-panel)/environ"