diff --git a/tools/re-capture/submenu_focus_sweep.py b/tools/re-capture/submenu_focus_sweep.py index 20ccbf44..f8300e7b 100644 --- a/tools/re-capture/submenu_focus_sweep.py +++ b/tools/re-capture/submenu_focus_sweep.py @@ -144,6 +144,12 @@ def _self_test(): print("── decision-rule self-test ──", flush=True) _self_test() +# Verifiable WITHOUT starting a run. Without this the only way to check the +# self-test was to launch the script, which then proceeds to wait ~150 s for a +# main menu and opens x11grab captures -- so "did my self-test pass?" could not be +# answered without disturbing whatever else was using the display. +if "--selftest-only" in sys.argv: + sys.exit(0) MAIN = wait_until(lambda a: main_menu_item(ring_row(img(a))) is not None and 250 <= glyph(a) <= 420, "the main menu", 150)