mirror of
https://github.com/lucannez64/darling-lol.git
synced 2026-10-26 19:47:42 +00:00
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.
This commit is contained in:
1 parent
97ff3df51d
commit
b4e4a0c59b
1 file changed
+9
@@ -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:])
|
||||
|
||||
Reference in new issue
Block a user