v86/tests
Christian Schnell 47fb4e1dd2 final cleanup and alignments with the V86 codebase
- changed return value of V86.wait_until_vga_screen_contains() to boolean with true:success and false:timeout
- removed "throw" and "finally" statements in V86.wait_until_vga_screen_contains()
- removed "finally" statements in exec_test() to simplify cleanup code
- removed "export" statements (forgotten leftovers from a silly experiment)
- simplified parsing of options.timeout_msec in V86.wait_until_vga_screen_contains()
- changed line-matching function to string.startsWith()
- switched from Element.innerHTML to Element.textContent in html assignments
- relaxed rules for handling of command in expected[] in expect()
- removed unused argument "fdc" from FloppyDrive constructor
- renamed variable "tm_end" to "end"
2025-08-23 10:14:32 -06:00
..
api final cleanup and alignments with the V86 codebase 2025-08-23 10:14:32 -06:00
benchmark minor 2025-06-09 14:47:55 +07:00
devices minor 2025-06-09 14:47:55 +07:00
expect remove "use strict" (is default in es6 modules) 2025-04-16 09:26:13 -07:00
full moved FreeDOS boot floppy tests to tests/full/run.js 2025-08-23 10:14:32 -06:00
jit-paging remove "use strict" (is default in es6 modules) 2025-04-16 09:26:13 -07:00
kvm-unit-tests minor refactoring (remove readfile, use direct import for libv86.js) 2025-04-16 09:26:13 -07:00
manual use emulator.destroy() over emulator.stop() to properly remove v86 instances 2024-12-20 10:41:09 -07:00
nasm remove "use strict" (is default in es6 modules) 2025-04-16 09:26:13 -07:00
qemu remove "use strict" (is default in es6 modules) 2025-04-16 09:26:13 -07:00
rust remove "use strict" (is default in es6 modules) 2025-04-16 09:26:13 -07:00
Readme.md liberate tests from libv86-debug.js 2025-04-16 09:26:13 -07:00

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 (source files with 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)