emdashes begone (#10847)

This commit is contained in:
Tom
2026-07-01 19:01:27 -05:00
committed by GitHub
co-authored by GitHub
parent dee94e0758
commit 3becaf2d95
276 changed files with 1795 additions and 1793 deletions
+16 -16
View File
@@ -1,4 +1,4 @@
# Meshtastic MCP Server Test Harness
# Meshtastic MCP Server - Test Harness
Automated test suite for the MCP server, organized around real operator
concerns rather than generic "unit vs hardware".
@@ -21,13 +21,13 @@ concerns rather than generic "unit vs hardware".
cd mcp-server
pip install -e ".[test]"
# No hardware 33 unit tests, ~3 seconds
# No hardware - 33 unit tests, ~3 seconds
pytest tests/unit -v
# Hub attached (nRF52840 + ESP32-S3) first run bakes, then exercises everything
# Hub attached (nRF52840 + ESP32-S3) - first run bakes, then exercises everything
pytest tests/ --html=report.html
# Hub already baked with session profile (dev loop) skip bake
# Hub already baked with session profile (dev loop) - skip bake
pytest tests/ --assume-baked --html=report.html
# Force a rebake (new firmware, new seed, etc.)
@@ -36,23 +36,23 @@ pytest tests/ --force-bake --html=report.html
## CLI flags
- `--force-bake` always reflash both roles at session start, even if the
- `--force-bake` - always reflash both roles at session start, even if the
current state matches the session profile.
- `--assume-baked` skip `test_00_bake.py` entirely. Use when you know the
- `--assume-baked` - skip `test_00_bake.py` entirely. Use when you know the
devices are already baked and want a fast dev loop.
- `--hub-profile=<yaml>` point at a YAML file for non-default hub hardware.
- `--hub-profile=<yaml>` - point at a YAML file for non-default hub hardware.
Default targets VID `0x239a` (nRF52) and `0x303a`/`0x10c4` (ESP32-S3).
- `--no-teardown-rebake` skip the session-end rebake that `provisioning/`
- `--no-teardown-rebake` - skip the session-end rebake that `provisioning/`
and `fleet/` tests perform. Useful in rapid iteration.
## Environment variables
- `MESHTASTIC_FIRMWARE_ROOT` firmware repo path (defaults to `../` from tests/)
- `MESHTASTIC_MCP_ENV_NRF52` PlatformIO env for the nRF52 role (default
- `MESHTASTIC_FIRMWARE_ROOT` - firmware repo path (defaults to `../` from tests/)
- `MESHTASTIC_MCP_ENV_NRF52` - PlatformIO env for the nRF52 role (default
`rak4631`)
- `MESHTASTIC_MCP_ENV_ESP32S3` PlatformIO env for the ESP32-S3 role (default
- `MESHTASTIC_MCP_ENV_ESP32S3` - PlatformIO env for the ESP32-S3 role (default
`heltec-v3`)
- `MESHTASTIC_MCP_SEED` override the session PSK seed (default:
- `MESHTASTIC_MCP_SEED` - override the session PSK seed (default:
`pytest-<unix-ts>`). Set this to reproduce a specific failing run.
## Fixtures you'll use when adding tests
@@ -64,7 +64,7 @@ All defined in `conftest.py`:
- **`test_profile`** → USERPREFS dict for the session (`build_testing_profile`).
- **`no_region_profile`** → variant without `USERPREFS_CONFIG_LORA_REGION`.
- **`baked_mesh`** → verifies both devices are baked with the session profile
(does NOT reflash that's `test_00_bake.py`'s job).
(does NOT reflash - that's `test_00_bake.py`'s job).
- **`baked_single`** → single verified baked device; parametrize `request.param`
to pick role.
- **`serial_capture`** → factory; `cap = serial_capture("esp32s3")` starts a
@@ -84,7 +84,7 @@ predicate(), timeout=60)` replaces flaky `time.sleep()` patterns.
`pytest --junitxml=junit.xml` produces CI-integration XML.
`tool_coverage.json` is emitted at session end in the tests directory shows
`tool_coverage.json` is emitted at session end in the tests directory - shows
which of the 38 MCP tools the run exercised. Useful for closing test gaps.
## Adding a new test
@@ -95,11 +95,11 @@ which of the 38 MCP tools the run exercised. Useful for closing test gaps.
on `baked_single`. If you need to mutate hardware state, put it in
`provisioning/` or `fleet/` and add a `try/finally` teardown that re-bakes
the session profile.
3. Use `wait_until` for anything involving LoRa timing fixed `sleep()`
3. Use `wait_until` for anything involving LoRa timing - fixed `sleep()`
produces flakes.
4. Use `serial_capture` when you need to observe firmware log output (e.g.
"did the packet get decoded?").
5. Add a `@pytest.mark.timeout(N)` mesh tests routinely hit LoRa-airtime
5. Add a `@pytest.mark.timeout(N)` - mesh tests routinely hit LoRa-airtime
waits; default pytest timeout is infinite.
## Troubleshooting