From 56bbac4ddb2b27afa29f1f4195333ebacee675b6 Mon Sep 17 00:00:00 2001 From: saphid <4596216+saphid@users.noreply.github.com> Date: Sun, 27 Sep 2026 17:27:50 +1000 Subject: [PATCH] Smoke test: wait for the evidence a launch needs; check the shortcut sync A launch that needs the program running kept looking after Steam's "started" line, rather than failing on it before the process showed up. Cleanup reads steamos-delete's log, which reports a failed sync but exits 0, and runs it twice to check Steam no longer lists our titles; until then they stay tracked and the cleanup step fails. Co-Authored-By: Claude Opus 5.5 (1M context) --- tests/smoke/frame_smoke.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tests/smoke/frame_smoke.py b/tests/smoke/frame_smoke.py index 3f16365..14e8ff0 100644 --- a/tests/smoke/frame_smoke.py +++ b/tests/smoke/frame_smoke.py @@ -158,7 +158,7 @@ def title_cycle(smoke, kind, folder): outcome, new = 'runtime missing', new + missing elif any('started devkit game' in line or 'chdir' in line for line in new): outcome = 'started' - if outcome != 'no evidence': + if outcome in EXPECTED[kind]: # else keep looking: the log can come before the process break time.sleep(0.5) detail = {'outcome': outcome, 'processes': procs, 'steam_log': new[-12:]} @@ -192,6 +192,7 @@ def cleanup(smoke): ids = set() problems.append(f'could not list titles: {e}') ids |= smoke.installed + gone = set() for gid in sorted(ids): try: if ssh(f'test -d ~/devkit-game/{gid} && echo yes || true').strip() == 'yes': @@ -201,15 +202,26 @@ def cleanup(smoke): if ssh(f'ls -d ~/devkit-game/{gid} ~/devkit-game/{gid}-*.json 2>/dev/null || true').strip(): problems.append(f'{gid} is still on the Frame') else: - smoke.installed.discard(gid) + gone.add(gid) except frame_android.FrameError as e: problems.append(f'{gid}: {e}') - if ids: + if gone: # steamos-delete with no title only syncs Steam's shortcuts with ~/devkit-game. + # It logs a failed sync and exits 0, so read its log; a second run lists + # what Steam still has registered, which must not include ours. try: - ssh('python3 ~/devkit-utils/steamos-delete 2>&1 || true', timeout=120) - except frame_android.FrameError as e: - problems.append(f'syncing Steam shortcuts: {e}') + first = ssh('python3 ~/devkit-utils/steamos-delete 2>&1', timeout=120) + second = ssh('python3 ~/devkit-utils/steamos-delete 2>&1', timeout=120) + for out in (first, second): + if 'sync of devkit games failed' in out: + raise AssertionError(out.strip().splitlines()[-1]) + for gid in sorted(gone): + if f'registered with Steam Client: {gid!r}' in second: + problems.append(f'{gid} is still registered with Steam') + else: + smoke.installed.discard(gid) + except (frame_android.FrameError, AssertionError) as e: + problems.append(f"syncing Steam's shortcuts: {e}") if problems: raise AssertionError('; '.join(problems)) return {'removed': sorted(ids)}