Files
uv-k5-v3-emulator/Dockerfile
mckero ae8b48c85a 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.
2026-10-01 15:12:45 +08:00

29 lines
1.1 KiB
Docker

# A box that can run the suite, and build the machine if you give it a QEMU tree.
#
# docker build -t uvk5 . && docker run --rm uvk5 # unit tests
# docker build -t uvk5 . && docker run --rm uvk5 bash tools/run_tests.sh
#
# The emulator tests need a patched QEMU build. Fetch a QEMU 7.2 tree first and mount it,
# because tools/setup_qemu.sh patches a tree rather than downloading one:
#
# 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'
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
bash build-essential git ca-certificates curl \
ninja-build pkg-config python3 \
libglib2.0-dev libpixman-1-dev libfdt-dev zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . /src
# Fast suite on build: it must pass without a QEMU tree, because that is what a
# contributor has on their first day.
RUN bash tools/run_tests.sh -q
CMD ["bash", "tools/run_tests.sh"]