Fabian 904593ca68 Skip snowdrop test if missing image 3 年之前
..
api 3ee95a549d api tests: Use linux4 image 3 年之前
benchmark 8638c6abaf benchmark script improvements 3 年之前
devices ea50e29e5f Remove dead & improve 3 年之前
expect 5f3453acf9 Update expect tests 3 年之前
full 904593ca68 Skip snowdrop test if missing image 3 年之前
jit-paging 5b95165de2 Add TEST_RELEASE_BUILD to run tests on release build 4 年之前
kvm-unit-tests 751cfed489 kvm-unit-test: Add a few benchmarks and run them longer 3 年之前
nasm 84714d17a4 Don't fail on atapi command 0xBE 3 年之前
qemu ca7dd68f6c Fix tests depending on arch 3 年之前
rust acb8ad5423 Avoid console.assert (doesn't throw) 3 年之前
Readme.md 2697aa6192 Document env variables for tests 3 年之前

Readme.md

Use the corresponding make target in the root directory to run a test. The following list is roughtly sorted from most interesting/useful to least.

  • nasm: Small unit tests written in assembly, which are run using gdb on the host.
  • qemu: Based on tests from qemu. Builds a Linux binary, which tests many CPU features, which are then compared to a run on qemu.
  • kvm-unit-test: Based on tests from the KVM project, tests various CPU features.
  • full: Starts several OSes and checks if they boot correctly.
  • jit-paging: Tests jit and paging interaction.
  • api: Tests for several API functions of v86.
  • devices: Device tests.
  • rust: Rust unit test helpers.
  • expect: Expect tests for the jit output. Contains a set of asm+wasm files, where the jit is expected to produce the wasm file given the asm file.

The following environmental variables are respected by most tests if applicable:

  • TEST_RELEASE_BUILD=1: Test the release build (libv86.js, v86.wasm) instead of the debug build (libv86-debug.js, v86-debug.wasm)
  • MAX_PARALLEL_TESTS=n: Maximum number of tests to run in parallel. Defaults to the number of cores in your system or less.
  • TEST_NAME="…": Run only the specified test (only expect, full, nasm)