The QEMU libraries left the public `qemu-prebuilt` release: they are GPL-2.0 derivatives of QEMU, and distributing one obliges us to hand the recipient the corresponding source, so binary and source now live in one place -- velxio.dev's gated endpoint, where the qemu-source-<commit> archive sits beside them. Six documents still pointed at the release. Two of them shipped runnable commands that now 404: the deploy-to-container curl pair in the WiFi notes, and the e2e README's claim about where CI gets its libraries (that workflow had in fact moved to the gated endpoint some time ago -- only the README was stale). Also corrects two things that were already wrong before today: QEMU_RELEASE_URL is documented with the release as its default, but Dockerfile.standalone defaults it to empty and reaches the binaries via VELXIO_LICENSE_KEY; and the asset inventory omitted the macOS, Windows and esp32s3_rev0_rom entries. |
||
|---|---|---|
| .. | ||
| README.md | ||
| package-lock.json | ||
| package.json | ||
| rp2040-bootrom.mjs | ||
| test_dht22_simulation.mjs | ||
| test_esp32_spice_analog.mjs | ||
| test_esp32_spice_ntc_bridge.mjs | ||
| test_esp32_spice_photodiode.mjs | ||
| test_esp32_spice_smoke.mjs | ||
| test_hcsr04_simulation.mjs | ||
| test_micropython_esp32.mjs | ||
| test_micropython_pico.mjs | ||
| test_mpu6050_simulation.mjs | ||
README.md
Backend E2E Tests (JavaScript / Node.js)
These tests compile real firmware via the backend API and run the full simulation through a WebSocket, verifying sensor readings in the serial output.
CI status
These tests run in GitHub Actions via .github/workflows/backend-e2e-tests.yml.
The CI workflow:
- Downloads
libqemu-xtensa-amd64andlibqemu-riscv32-amd64from velxio.dev's gated endpoint ($VELXIO_BINARY_BASE_URL/<asset>?key=$VELXIO_LICENSE_KEY), using theVELXIO_LICENSE_KEYrepository secret. Free personal keys at https://velxio.dev/license/signup. - Downloads ROM files:
esp32-v3-rom.bin,esp32-v3-rom-app.bin,esp32c3-rom.bin. - Installs arduino-cli +
esp32:esp32core. - Starts
uvicorn app.main:app --port 8001withQEMU_ESP32_LIBandQEMU_RISCV32_LIBset. - Runs all three JS tests.
Local prerequisites
-
Backend running with QEMU libs in PATH:
cd backend QEMU_ESP32_LIB=/path/to/libqemu-xtensa.so \ QEMU_RISCV32_LIB=/path/to/libqemu-riscv32.so \ uvicorn app.main:app --reload --port 8001On Windows the
.dllfiles live inbackend/app/services/. -
Node.js 18+ installed.
Run all e2e tests
Use the convenience script from the repo root:
# Windows
scripts\run-e2e-tests.bat
# Or individually (from repo root):
node test/backend/e2e/test_dht22_simulation.mjs --timeout=60
node test/backend/e2e/test_hcsr04_simulation.mjs --timeout=75
node test/backend/e2e/test_mpu6050_simulation.mjs --timeout=60
Tests
| File | Sensor | What it verifies | Typical runtime |
|---|---|---|---|
test_dht22_simulation.mjs |
DHT22 (GPIO4) | Temperature & humidity readings, sensor_update changes values |
~50 s |
test_hcsr04_simulation.mjs |
HC-SR04 (GPIO18/19) | Distance at 10/40/100/200 cm, sensor_update changes distance |
~60 s |
test_mpu6050_simulation.mjs |
MPU-6050 (I2C) | Accelerometer/gyroscope I2C readings | ~40 s |
Pass criteria
| Test | Passes when |
|---|---|
| DHT22 | First reading received + values change after sensor_update |
| HC-SR04 | ≥3 correct readings, ≥2 distances, miss rate ≤30% |
| MPU-6050 | I2C communication established, sensor data in serial output |