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

+16 -1
View File
@@ -10,7 +10,22 @@ import time
import unittest
import uvk5_image
import webui
# Flask is the one thing the fast suite needs from pip, so it is not always there.
# A missing dependency is a skip with a reason, not a failure -- but at *module* level
# raising SkipTest is reported as an error rather than a skip, so the check goes in
# setUpModule(), which unittest treats as skipping the whole file.
webui = None
try:
import webui # noqa: F811
except ImportError:
pass
def setUpModule():
if webui is None:
raise unittest.SkipTest(
"the web UI tests need flask; install it with "
"pip install -r requirements-dev.txt")
from uvk5_supervisor import FlashSlot