summaryrefslogtreecommitdiffstats
path: root/tests/serverctl.sh
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-24 14:53:56 +0200
committerblasty <blasty@local>2026-07-24 14:53:56 +0200
commit22ffea91210610d1def042e230ffe8d223022b30 (patch)
treea70c84470a0f4f46901cb221f2d0dd3859895b41 /tests/serverctl.sh
parentmcp: collapse app + launcher to worker-only (diff)
downloadida-tui-22ffea91210610d1def042e230ffe8d223022b30.tar.gz
ida-tui-22ffea91210610d1def042e230ffe8d223022b30.tar.xz
ida-tui-22ffea91210610d1def042e230ffe8d223022b30.zip
mcp: delete the ida-pro-mcp transport, supervisor, and mcp-only tests
The idalib worker is the only backend now, so remove the dead HTTP/supervisor surface entirely (~2200 lines): * deleted idatui/client.py (the IDAClient HTTP/JSON-RPC transport + session manager), idatui/tui.py (the old mcp TUI entry, superseded by launch.py), spawn.sh, and systemd/ (the supervisor unit). * deleted the mcp-only tests (stress_client, smoke_client, test_keepalive, stress_paging, rpc_smoke, serverctl.sh, pane_smoke, test_domain) -- the worker pilot (tests/test_scenarios.py) supersedes them. * migrated the tmux RPC harness (idatui/pane.py) to the worker: it spawns `idatui.launch <binary> --rpc <sock>` instead of the mcp `idatui.tui`, drops the supervisor auto-start/ensure machinery, and reaps our own worker (idatui/worker.py) instead of ida_pro_mcp.idalib_server. --db/--url/--no- ensure-server are gone; --open is required. * __init__ / __main__ / domain no longer import client (exceptions come from errors.py, the domain client hint is WorkerClient); pyproject points both console scripts at idatui.launch; README + ida-tui header describe the worker-only flow. What stays (by design): the ida_pro_mcp *package* (the worker reuses its @tool functions in-process) and server/patch_server.py (the worker injects its custom tools on startup). Verified: whole package imports + IdaTui constructs + pilot lists 31 scenarios. The worker pilot (134 pass / 2 known flakes) is the E2E gate.
Diffstat (limited to 'tests/serverctl.sh')
-rwxr-xr-xtests/serverctl.sh65
1 files changed, 0 insertions, 65 deletions
diff --git a/tests/serverctl.sh b/tests/serverctl.sh
deleted file mode 100755
index a5bc098..0000000
--- a/tests/serverctl.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env bash
-# Control the ida-pro-mcp server for stress testing. Assumes ~/ida-venv + spawn.sh.
-set -u
-REPO="$(cd "$(dirname "$0")/.." && pwd)"
-PORT=8745
-LOG=/tmp/ida-stress-spawn.log
-
-wait_port() { # wait_port <up|down> <secs>
- local want="$1" secs="${2:-40}" i
- for ((i=0; i<secs*2; i++)); do
- if ss -ltn 2>/dev/null | grep -q ":$PORT "; then
- [ "$want" = up ] && return 0
- else
- [ "$want" = down ] && return 0
- fi
- sleep 0.5
- done
- return 1
-}
-
-wait_ready() { # wait until hexrays_ready via the client
- local secs="${1:-60}" i
- for ((i=0; i<secs; i++)); do
- if python3 -c "
-import sys; sys.path.insert(0,'$REPO')
-from idatui.client import IDAClient
-try:
- c=IDAClient(); c.connect()
- ss=[s for s in c.list_sessions() if s.session_id]
- if ss:
- c.set_db(ss[0].session_id)
- if c.health().get('hexrays_ready'): print(ss[0].session_id); sys.exit(0)
-except Exception: pass
-sys.exit(1)
-" 2>/dev/null; then return 0; fi
- sleep 1
- done
- return 1
-}
-
-case "${1:-}" in
- start)
- cd "$REPO"
- source ~/ida-venv/bin/activate 2>/dev/null
- nohup ./spawn.sh >"$LOG" 2>&1 &
- wait_port up 40 || { echo "PORT_TIMEOUT"; tail -5 "$LOG"; exit 1; }
- wait_ready 90 || { echo "READY_TIMEOUT"; tail -5 "$LOG"; exit 1; }
- ;;
- stop)
- # Kill the whole tree: uv wrapper, supervisor, worker.
- pkill -9 -f 'idalib_server' 2>/dev/null
- pkill -9 -f 'idalib-mcp' 2>/dev/null
- pkill -9 -f 'uv run idalib' 2>/dev/null
- wait_port down 20 || { echo "STOP_TIMEOUT"; exit 1; }
- ;;
- kill9)
- # Hard kill only the worker (simulate a crash of the analysis process).
- pkill -9 -f 'idalib_server' 2>/dev/null
- ;;
- ready)
- wait_ready "${2:-60}"
- ;;
- *)
- echo "usage: $0 {start|stop|kill9|ready [secs]}"; exit 2;;
-esac