diff --git a/docs/HLSD/mcp-server.md b/docs/HLSD/mcp-server.md index 6b6b20be33..71e08784b7 100644 --- a/docs/HLSD/mcp-server.md +++ b/docs/HLSD/mcp-server.md @@ -4756,7 +4756,7 @@ and `app_state.camera`, and a fit after the window was sized while no 3D view sh `tools/mcp/test_send_gcode.py` `printer_send`, `print_start`, `printer_test_host` and `app_state.uploads` against a stub print host that answers 200 or 500, `tools/mcp/test_printers.py` `printer_status` and the job commands' refusals with no printer connected, and the extruders of a two-extruder printer it installs, -`tools/mcp/test_command_line.py` the command line's options (the refused ones, `--run`'s exit codes, folders and +`tools/mcp/test_command_line.py` the command line's options (`--run`'s exit codes, folders and refusals, `--mcp-port`, the two run flags, and a run beside a window already open), `tools/mcp/test_runtime_lifecycle.py` the app's exit with a job, a recording or a call no stop interrupts still running and with the endpoint never opened, the server switched off and on during a call, and the GUI diff --git a/tools/mcp/README.md b/tools/mcp/README.md index 65feb1f557..bb92d9025d 100644 --- a/tools/mcp/README.md +++ b/tools/mcp/README.md @@ -168,8 +168,8 @@ the single-instance preference says, and it is refused with an action or `--down no GUI. `test_command_line.py [--bin PATH] [CHECK ...]` checks that command line, starting the built app as its own -child on fresh data folders: that the options it does not have are refused before any GUI starts, `--run`'s exit -codes and folders, its refusal beside an action or `--downward-check`, that `--mcp-port` alone opens the server, +child on fresh data folders: `--run`'s exit codes and folders, its refusal beside an action or `--downward-check` +before any GUI starts, that `--mcp-port` alone opens the server, that `--unrestricted-scripts` and `--cad` hold for the run without writing the configuration, and a run beside a window already open on the same data folder. It prints one line per check and takes about two to three minutes. diff --git a/tools/mcp/test-entries/runtime.md b/tools/mcp/test-entries/runtime.md index 3d6ac4550f..8b2e530cd9 100644 --- a/tools/mcp/test-entries/runtime.md +++ b/tools/mcp/test-entries/runtime.md @@ -4,16 +4,15 @@ The design of this area's sweep tests. The rules every entry follows, the grades in [TESTS.md](../TESTS.md). ## `test_command_line` -`test_command_line.py` · Python, 10 checks +`test_command_line.py` · Python, 9 checks -**Tests:** OrcaSlicer's own command line. Each case starts the app as the test's child on a new data folder of its own (`launch: own`, `port-13694` lock, and the fixed port 13693 for a second window). It covers refused legacy options, `--run`'s exit codes and output folders for a replay and a script, `--run` refused beside a CLI action, `--mcp-port` opening the server, `--unrestricted-scripts` and `--cad` holding for one run only, `--run` beside a window already open, and single-instance hand-over per data folder. +**Tests:** OrcaSlicer's own command line. Each case starts the app as the test's child on a new data folder of its own (`launch: own`, `port-13694` lock, and the fixed port 13693 for a second window). It covers `--run`'s exit codes and output folders for a replay and a script, `--run` refused beside a CLI action, `--mcp-port` opening the server, `--unrestricted-scripts` and `--cad` holding for one run only, `--run` beside a window already open, and single-instance hand-over per data folder. **Starts from:** Data folders of its own, a new one per case, never a job's shared folder: `seed_datadir()` with the default printer, the Generic Klipper Printer 0.4 nozzle, with preset sync off and the update check sent to a port nothing answers, then the case's own conf values. No check reads a preset, and nothing here is a Bambu Lab printer's own. Its first start copies the Custom vendor's and the Orca Filament Library's profiles only (a Klipper folder was ready about 8 s after the launch on Windows, measured), well inside the 120 s limits. **Leaves:** Nothing: each case's folder is deleted when the case ends, retried while WebView2's processes let go of its files. **Decides by:** Exits 1 when any check prints FAIL. Each check collects problems from exit codes, stderr text, files on disk and a few MCP reads. -- `refused_options`: `--mcp-run`, `--mcp-run-out`, `--mcp-token` and `--no-mcp` each exit non-zero within 10 s, with "Invalid option" on stderr. The data folder holds only `OrcaSlicer.conf`. - `run_invalid_file`: the exit code is exactly 2 for a missing `.json` and for a `.txt`. - `run_replay_folders`, `run_script_output_folder`: each run exits 0. `result.json` is in `r.out`, or only in `--outputdir`. Exactly one `.png` lands in `--outputdir` or in `/automation/out`, none in the other, and `/mcp/out` does not exist. - `run_refused_without_gui`: the exit code is -2 or 254, stderr has "--run cannot be combined with