Pull requests / #3162
#3162 tests: three suite gaps a live PC showed (no engine, setup, serve, or docs change)
open · @Buddychek · 0 comments · View on GitHub
Setup & installServer & APIAMD / HIPNVIDIA / CUDAModels & quantsDocumentationWindows
Description
## Title
tests: three suite gaps a live PC showed (no engine, setup, serve, or docs change)
Issue: Resolves #
## Summary
Running all 71 of `tools/test_*.py` on a normal PC that has a Strata server live on 8080 turned up three ways the suite
breaks for reasons that have nothing to do with the change under review. All three are test-side; nothing in `src/`,
`engine/`, `serve/`, `setup.py`, `CMakeLists.txt` or the docs moves.
```text
python tools/test_x.py
├── test_iq_pack.py # exits hard: _paths.gguf_py() calls sys.exit without llama.cpp's gguf-py
├── test_strata_mcp.py # 4 StartStop tests: strata_status probes the real default port 8080
└── test_conversation_cache_*.py (6x) # ModuleNotFoundError: No module named 'tools'
```
## What changed
- `tools/test_iq_pack.py` - `tools/_paths.py`'s `gguf_py()` calls `sys.exit()` when llama.cpp's `gguf-py` is absent
(a checkout that never ran `setup.py`, i.e. `third_party/llama.cpp` missing), so the file could not be run at all.
The three classes that build GGUF fixtures (`CompatibilityTests`, `ConversionTests`, `SplitArtifactTests`) now
`setUpClass`-skip with the same pointer `_paths.py` prints. `split_model`'s `gate1=Q.Q8_0` default moved out of the
signature (evaluated at import) so the module imports without `gguf-py`.
- `tools/test_strata_mcp.py` - `write_config`'s default port and `strata_status`'s port scan both use
`strata_mcp.DEFAULT_PORT` (8080), so a Strata server running on the PC while the tests run answers the probes:
`test_start_status_bench_stop` and `test_status_sees_other_programs_on_the_port` saw it as a running Strata,
`test_loading_then_ready` got "running" instead of "loading", `test_never_kills_an_unrelated_process` stopped it.
`DEFAULT_PORT` is patched to a fresh free port in `setUp` and restored in `tearDown`.
- `tools/test_conversation_cache_{disabled,growth,http_smoke,isolation,parity,soak}.py` - these import `tools.*`,
which resolves only under `python -m tools.test_x`; `AGENTS.md` tells people to run setup's tests as
`python tools/test_setup_<name>.py`. Each now inserts the repo root on `sys.path` from its own location, so both
start forms work.
## Extra Notes
**Measured on this PC (Windows, Python 3.15, no GPU, no downloads) with a real Strata server running on 8080:**
- Before: 9 of 71 files failed - `test_setup_golden` (3), `test_iq_pack` (1), `test_strata_mcp` (4),
the six `test_conversation_cache_*` (6). After: **71/71 pass** run as files, with `test_iq_pack` reporting
`skipped=3` where `gguf-py` is absent.
- The eight files touched here pass in both start forms (`python tools/test_x.py` and `python -m tools.test_x`).
**Deliberately not in this PR:** the `test_setup_golden` `os.cpu_count` mock is #3018's, and the `CMP0169` pin with
`tools/test_fetchcontent_policy.py` is #3015's - both stay in their own threads.
**Rollback:** test files only, no runtime code, no golden baseline edited - reverting the commit restores the suite as
it was. The default path is byte-identical.
**Not tested:** the CUDA/HIP/SYCL engines are not built here, and none of their files is touched; `test_iq_pack`'s
GGUF fixture tests are skipped on this checkout (no `llama.cpp` clone), so their content is verified only on a
checkout that has run `setup.py`.
Related on this site
Quick links to related pages.