Run anywhere: no author paths left, and CI that proves it

tools/run_tests.sh defaults QEMU_SRC to a sibling of the checkout, which is where setup_qemu.sh puts it; the two defaults disagreed, so a fresh clone rebuilt nothing and reported a build that was not there. The interpreter list was also reading an empty $PY.

tools/test_bk4819_readback.sh was the last test with the author's paths, and the only one that could not run elsewhere. It now takes QEMU, GDB and ELF from the environment or PATH like the python tests, skips with a reason when one is missing, and says so on a platform whose QEMU cannot make the unix socket it uses.

tools/check_docs.py points UVK5_FW_DIR at a sibling and skips the file:line checks, with a message, when there is no firmware tree -- a fresh clone used to see thirteen failures it could do nothing about.

Added .github/workflows/unit.yml (the fast half of run_tests.sh on every push and PR), requirements-dev.txt for the one pip dependency, and a Dockerfile. Flask is not always installed, so test_webui now skips through setUpModule rather than erroring.
This commit is contained in:
mckero committed 2026-10-01 15:12:45 +08:00
1 parent 1308c98769
commit ae8b48c85a
12 files changed
+176 -18

No files matched your search

+10 -1
View File
@@ -36,7 +36,11 @@ SIM = pathlib.Path(__file__).resolve().parent.parent
# Where the firmware sources are. Override when the tree is not at the default
# path -- without that the checker cannot run anywhere but the machine it was
# written on, and the file:line checks are the ones that catch drifting prose.
FW = pathlib.Path(os.environ.get("UVK5_FW_DIR", "/root/uvk5-port/uvk5-sat/App"))
# Firmware sources are not in this repository (see the README), so the default is a
# sibling of this checkout and the checks that need the tree are skipped without it.
# A fresh clone used to see thirteen failures it could do nothing about.
_fw_env = os.environ.get("UVK5_FW_DIR")
FW = pathlib.Path(_fw_env) if _fw_env else (SIM.parent / "uvk5-port" / "uvk5-sat" / "App")
PAIRS = [
("README.md", "README.zh-CN.md"),
@@ -185,6 +189,11 @@ def check_documented_flags():
def check_line_refs():
print("firmware file:line references must point at what the docs claim")
if not FW.is_dir():
print(f" SKIP no firmware tree at {FW}; set UVK5_FW_DIR to check "
f"{len(LINE_REFS)} file:line references")
return
for (name, line), needle in sorted(LINE_REFS.items()):
path = resolve_fw(name)
if path is None: