diff options
Diffstat (limited to 'experiments/graph_shot.py')
| -rw-r--r-- | experiments/graph_shot.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/experiments/graph_shot.py b/experiments/graph_shot.py index 5f0d45a..e024809 100644 --- a/experiments/graph_shot.py +++ b/experiments/graph_shot.py @@ -1,6 +1,6 @@ """Render the graph view headless at a chosen size and print it. - ~/ida-venv/bin/python experiments/graph_shot.py [func] [cols] [rows] [zoom] + ~/ida-venv/bin/python experiments/graph_shot.py [func] [cols] [rows] [zoom] [engine] The pane a person runs this in is usually too small to judge the layout, and the pilot lays out synchronously at whatever size you ask for -- so this is the way @@ -19,6 +19,7 @@ func = sys.argv[1] if len(sys.argv) > 1 else "sub_2297" cols = int(sys.argv[2]) if len(sys.argv) > 2 else 170 rows = int(sys.argv[3]) if len(sys.argv) > 3 else 55 zoom = int(sys.argv[4]) if len(sys.argv) > 4 else 0 +engine = sys.argv[5] if len(sys.argv) > 5 else None src, tmp = f"{REPO}/targets/echo", "/tmp/echo_shot" shutil.copy(src, tmp) @@ -46,6 +47,10 @@ async def main() -> None: await pilot.pause(0.2) await pilot.press("space") gv = app.query_one(GraphView) + if engine: + gv._engine = engine + gv._relayout() + app._graph_status() ok = await wait_for(lambda: app._active == "graph" and gv.lay is not None, pilot.pause, 90) if not ok: |
