aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing/tests/test_desktop.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/testing/tests/test_desktop.py')
-rw-r--r--scripts/testing/tests/test_desktop.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/testing/tests/test_desktop.py b/scripts/testing/tests/test_desktop.py
index 468bc75..1538d6a 100644
--- a/scripts/testing/tests/test_desktop.py
+++ b/scripts/testing/tests/test_desktop.py
@@ -93,7 +93,13 @@ def test_hyprland_socket(host, hyprland_installed, compositor_running):
pytest.skip("Hyprland not installed")
if not compositor_running:
pytest.skip("Hyprland not running (headless) — socket check not applicable")
- assert host.run("test -S /tmp/hypr/*/.socket.sock").rc == 0
+ # `test -S` on a shell glob breaks at both edges: zero matches leaves the
+ # literal pattern (rc 1) and several instances pass multiple args (rc 2).
+ # find -type s proves exactly one live socket path exists.
+ sock = host.run(
+ "find /tmp/hypr -maxdepth 2 -name .socket.sock -type s | head -1"
+ ).stdout.strip()
+ assert sock, "no Hyprland socket found under /tmp/hypr"
@pytest.mark.attribution("archsetup")