tools/driver_ota.py (make ota-drivers) pushes the driver's .py files through the controller, one file per POST /drivers/ota/file. Drivers skip files they already have, and the rest are committed together. - one target: acked unicast, two chunks in flight - several targets: each file is broadcast once, then each driver is asked for its missing chunks and repaired by unicast - rel: rel_send_seq, rel_wait and rel_send_wait, plus a callback for the drivers' 0x26 status replies - commands are retried, because status replies are not acked - broadcast chunks are paced 50 ms apart: faster broadcast left C3 drivers unable to receive until reset - bench results in docs/BENCH_TEST.md, endpoints in docs/API.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
631 B
Python
20 lines
631 B
Python
#!/usr/bin/env python3
|
|
"""Run the led-driver link and beat tests on the host (they are plain Python)."""
|
|
import os
|
|
import sys
|
|
|
|
root = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "led-driver")
|
|
sys.path[:0] = [os.path.join(root, "src"), os.path.join(root, "tests")]
|
|
|
|
import test_beat_sync # noqa: E402
|
|
import test_espnow_ota # noqa: E402
|
|
import test_espnow_rx # noqa: E402
|
|
|
|
n = 0
|
|
for mod in (test_espnow_rx, test_beat_sync, test_espnow_ota):
|
|
for name, fn in list(vars(mod).items()):
|
|
if name.startswith("test_") and callable(fn):
|
|
fn()
|
|
n += 1
|
|
print(f"{n} driver tests passed")
|