tools/uos-boot-test/uos-kernel-coverage.py: - New coverage orchestration script (376 lines) - Integrates with existing uos-cover tools - Workflow: instrument → build → run → extract → parse → report - Supports --arch, --report, --timeout, --skip-build flags - Handles missing UMAP data gracefully (expected for initial integration) kernel/Makefile: - Add coverage targets: coverage, coverage-armv7, coverage-aarch64, etc. - Configurable COVERAGE_TOOL and COVERAGE_REPORT paths .github/workflows/ci.yml: - Add 'kernel-coverage' job for armv7 - Runs after kernel-build - Installs QEMU + cross-compiler + Python - Runs uos-kernel-coverage.py - Uploads coverage report as artifact Phase 3 of testing roadmap: Coverage analysis infrastructure operational. Note: Full coverage requires libuoscov runtime in kernel (future work). |
||
|---|---|---|
| .. | ||
| README.md | ||
| uos-boot-test.py | ||
| uos-kernel-coverage.py | ||
uos-boot-test
QEMU boot test orchestrator for UniversalisOS. Spawns QEMU for each architecture, monitors UART output for the boot banner, and reports pass/fail.
Usage
# Test all architectures
python3 tools/uos-boot-test/uos-boot-test.py --arch all
# Test specific architecture
python3 tools/uos-boot-test/uos-boot-test.py --arch armv7
# Generate JUnit XML for CI
python3 tools/uos-boot-test/uos-boot-test.py --arch all --junit results.xml
# Custom timeout
python3 tools/uos-boot-test/uos-boot-test.py --arch armv7 --timeout 30
# Verbose output (show UART)
python3 tools/uos-boot-test/uos-boot-test.py --arch all --verbose
How It Works
- Build: Compiles the kernel for the target architecture (skipped with
--no-build) - Boot: Launches QEMU with the compiled ELF
- Monitor: Captures UART output for up to
--timeoutseconds - Verify: Checks for the "UniversalisOS" banner string in output
- Report: Prints pass/fail and optionally generates JUnit XML
Exit Codes
0— All tests passed1— One or more tests failed
CI Integration
The JUnit XML output integrates with GitHub Actions:
- name: Run boot tests
run: python3 tools/uos-boot-test/uos-boot-test.py --arch all --junit test-results.xml
- name: Publish test results
uses: dorny/test-reporter@v1
if: always()
with:
name: Boot Tests
path: test-results.xml
reporter: java-junit
Supported Architectures
| Architecture | QEMU Binary | Default Flags |
|---|---|---|
armv7 |
qemu-system-arm |
-M virt -cpu cortex-a15 -m 512M -nographic |
aarch64 |
qemu-system-aarch64 |
-M virt,gic-version=3,virtualization=on -cpu cortex-a53 -m 512M -smp 4 -nographic |
riscv |
qemu-system-riscv64 |
-machine microchip-icicle-kit -smp 5 -m 2G -nographic -bios none |
Limitations
- Only checks for boot banner (no functional test validation)
- RISC-V
-bios noneis BSP-only (secondaries held in reset) - AArch64 requires
virtualization=on(see AGENTS.md gotcha) - Timeout may kill QEMU before banner appears on slow systems