From 7efc15370694944ec1be52b4269f5fa7d39dd00d Mon Sep 17 00:00:00 2001 From: ibizaman Date: Fri, 11 Jul 2025 17:28:43 +0200 Subject: [PATCH] gracefully handle cases where no trace is found --- test/common.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/common.nix b/test/common.nix index 4aceaea..ca6d69c 100644 --- a/test/common.nix +++ b/test/common.nix @@ -120,7 +120,10 @@ let + (optionalString (hasAttr "test" nodes.server && hasAttr "login" nodes.server.test) '' with subtest("Login from server"): code, logs = server.execute("login_playwright") - server.copy_from_vm("trace") + try: + server.copy_from_vm("trace") + except: + print("No trace found on server") print(logs) if code != 0: raise Exception("login_playwright did not succeed") @@ -128,7 +131,10 @@ let + (optionalString (hasAttr "test" nodes.client && hasAttr "login" nodes.client.test) '' with subtest("Login from client"): code, logs = client.execute("login_playwright") - client.copy_from_vm("trace") + try: + server.copy_from_vm("trace") + except: + print("No trace found on client") print(logs) if code != 0: raise Exception("login_playwright did not succeed")