From 0e1e0486d65a8626cf36ac8504544c9b68f9ceb1 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Wed, 7 Oct 2026 19:33:34 +0800 Subject: [PATCH] test(nix): report desktop startup failures promptly --- nix/tests/native-runtime.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nix/tests/native-runtime.nix b/nix/tests/native-runtime.nix index 3513012..2e1e8c1 100644 --- a/nix/tests/native-runtime.nix +++ b/nix/tests/native-runtime.nix @@ -61,7 +61,12 @@ pkgs.testers.runNixOSTest { # Exercise real host pkexec, private credential pipes and launcher cancellation. command = "GP_GUI_BINARY=${guiProbe} " + package + "/bin/gpclient --lock-file /tmp/gp-client.lock launch-gui" as_alice(command + " > /tmp/gp-client-output 2>&1 & echo $! > /tmp/gp-client-pid") - machine.wait_until_succeeds("test -s /tmp/gp-gui-ready") + try: + machine.wait_until_succeeds("test -s /tmp/gp-gui-ready", timeout=30) + finally: + print(machine.succeed("cat /tmp/gp-client-output")) + print(machine.succeed("cat /home/alice/.local/share/gpclient/gpclient.log 2>/dev/null || true")) + print(machine.succeed("journalctl -u polkit --no-pager")) service_pid = machine.succeed("cut -d: -f1 /var/run/gpservice.lock").strip() machine.succeed("test $(stat -c %u /proc/" + service_pid + ") = 0") as_alice("kill -TERM $(cat /tmp/gp-client-pid)")