lmb / vimto

Run Go tests on a custom kernel
MIT License
19 stars 3 forks source link

vimto

vimto logo

vimto is a virtual machine testing orchestrator for the Go toolchain. It allows you to easily run Go unit tests using a specific Linux kernel.

# With .vimto.toml in place:
vimto -- go test .
# Otherwise:
vimto -kernel /path/to/vmlinuz -- go test .

The tests are executed inside an ephemeral VM, with an execution environment which mimics the host.

It's possible to obtain the kernel from a container image (requires Docker).

vimto -kernel example.org/reg/image:tag -- go test .

Finally, you can also use a path to a directory:

vimto -kernel /path/to/dir -- go test .

vimto expects the kernel to be at /boot/vmlinuz for containers and directories. See also Container format.

Installation

Install using the Go toolchain:

CGO_ENABLED=0 go install lmb.io/vimto@latest

Configuration

vimto reads a configuration file .vimto.toml in TOML format, either from the current directory or from the root of the git repository enclosing the current directory.

All available options and their values are in testdata/default.toml.

Currently not supported

Requirements

Here is a non-exhaustive list of required Linux options: