From b4e4a0c59be7681e92c15a4f260d2e823e6c79dc Mon Sep 17 00:00:00 2001 From: zero Date: Sun, 25 Oct 2026 13:00:23 -0600 Subject: [PATCH] test(launcher): follow the supervisor handoff in the offline check The stub records the final darling launch after exec-guest.py. The launcher now runs session-supervisor.py first, so the stub hands the supervised command to exec-guest.py instead of stopping at the supervisor. The guest assertions are unchanged: they still inspect the launch that exec-guest.py performs. --- tools/riot-launcher-offline-check.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/riot-launcher-offline-check.py b/tools/riot-launcher-offline-check.py index 0280d4e..d280b32 100644 --- a/tools/riot-launcher-offline-check.py +++ b/tools/riot-launcher-offline-check.py @@ -23,6 +23,15 @@ def check(): stub = f'''#!{sys.executable} import json, os, sys record = {{"command": os.path.basename(sys.argv[0]), "args": sys.argv[1:]}} +# The launcher hands the guest to the session supervisor before exec-guest.py. +# Run the supervised command without recording the supervisor itself, so the +# existing assertions still inspect the guest launch that follows. +if record["command"] == "python3" and sys.argv[1:] and os.path.basename(sys.argv[1]) == "session-supervisor.py": + remainder = sys.argv[2:] + if "--" in remainder: + command = remainder[remainder.index("--") + 1:] + if command and command[0] == "python3": + os.execv(sys.executable, [sys.executable] + command[1:]) # The launcher starts the guest through exec-guest.py; run it for real. if record["command"] == "python3" and sys.argv[1:] and os.path.basename(sys.argv[1]) == "exec-guest.py": os.execv(sys.executable, [sys.executable] + sys.argv[1:])