mirror of
https://github.com/MCKero6423/uv-k5-v3-emulator.git
synced 2026-10-02 03:15:36 +00:00
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:
1 parent
1308c98769
commit
ae8b48c85a
12 files changed
+176
-18
No files matched your search
@@ -118,6 +118,25 @@ keypresses silently stop working. Run the test after touching that code;
|
||||
kept because they are quick to reach for, not because they are polished)
|
||||
harness/, stubs/, shim/, tests/ host build of the CW timing chain (stage A)
|
||||
|
||||
### Running it elsewhere: CI and a container
|
||||
|
||||
`.github/workflows/unit.yml` installs `requirements-dev.txt` (flask) and runs `tools/run_tests.sh -q`
|
||||
on every push and pull request:
|
||||
the `test_uvk5_*.py` unit tests plus `check_docs.py`, which need no emulator, no firmware and
|
||||
no QEMU build. That path is what keeps the suite honest on a machine that is not this one --
|
||||
before it existed, the runner's default paths were the author's, and a fresh clone could not
|
||||
run anything without editing it.
|
||||
|
||||
`Dockerfile` builds a box with the same tooling, and can run the emulator tests if you give
|
||||
it a QEMU tree, because `tools/setup_qemu.sh` patches a tree rather than downloading one:
|
||||
|
||||
docker build -t uvk5 . && docker run --rm uvk5 # unit tests
|
||||
docker run --rm -v /path/to/qemu-7.2:/qemu-7.2 -e QEMU_SRC=/qemu-7.2 uvk5 \
|
||||
bash -lc 'bash tools/setup_qemu.sh && bash tools/run_tests.sh'
|
||||
|
||||
The `file:line` checks in `check_docs.py` need the firmware sources, which are not in this
|
||||
repository. Without them the checker skips those checks and says so; point `UVK5_FW_DIR` at
|
||||
a tree to have them run.
|
||||
## What is not in this repository
|
||||
|
||||
Two things are deliberately absent, and neither should be committed:
|
||||
|
||||
Reference in new issue
Block a user