End-to-end test harness for the SpaceOS pipeline
OCaml 90.9%
Dune 2.8%
Other 6.3%
6 1 0

Clone this repository

https://tangled.org/gazagnaire.org/space-test https://tangled.org/did:plc:jhift2vwcxhou52p3sewcrpx/space-test
git@git.recoil.org:gazagnaire.org/space-test git@git.recoil.org:did:plc:jhift2vwcxhou52p3sewcrpx/space-test

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

space-test#

SpaceOS end-to-end test harness.

space-test validates the full SpaceOS pipeline in a single automated run: build artifacts from configuration, boot VMs headless, verify that IPC frames flow through the relay, and assert clean shutdown. It exits 0 when all assertions pass and 1 otherwise.

The test sequence is:

  1. Build -- load build.yml (or defaults), compile kernel and initramfs artifacts via Space.Build
  2. Run headless -- boot VMs using Space.Run, wait for IPC frames to flow through the relay up to a configurable target count and timeout
  3. Assert frames -- verify at least N frames were relayed
  4. Assert shutdown -- verify the session exited cleanly (exit code 0)

Installation#

opam install space-test

Usage#

# Run with defaults (10 frames, 60s timeout)
space-test

# Custom thresholds
space-test --frames 50 --timeout 120

# Override build/run configs and kernel
space-test --build build.yml --run run.yml --kernel /path/to/vmlinuz

Exit codes#

  • 0 -- all assertions passed
  • 1 -- one or more assertions failed

API#

  • E2e -- library module with pure test logic:
    • config -- test configuration (build/run file paths, kernel override, min frames, timeout)
    • step_result -- Pass of string | Fail of string
    • check_frames / check_exit_code -- assertion helpers
    • report -- prints a summary and returns the exit code