name: test description: Guide for running Nanvix tests with z. Use this when asked to run unit tests, integration tests, or the full test suite.
Test Nanvix
Use this skill when the user asks to run tests on Nanvix. This covers unit tests, system
integration tests, and the combined test suite exposed through the z utility.
Prerequisites
- Development environment set up per
doc/setup.md. - A successful build of the components under test (see the
buildskill).
Unit Tests
./z build -- run-unit-tests
System Integration Tests (microvm only)
./z build -- run-nanvix-tests
Test configurations are auto-selected based on deployment mode:
- Standalone:
test/test-standalone.toml(Linux),test/test-standalone-windows.toml(Windows) - Single-process:
test/test-single_process.toml - L2 VM:
test/test-l2.toml - Multi-process:
test/test-multi_process.toml
All Tests
./z build -- test
Windows
On Windows, unit tests can be run natively through z.ps1:
.\z.ps1 build -- run-unit-tests
System integration tests are also available on Windows for standalone mode
(DEPLOYMENT_MODE=standalone) on microvm machines:
.\z.ps1 build -- run-nanvix-tests
Single-process, L2 and multi-process deployment modes remain Linux-only as they require
nanvixd with network namespace support.
Troubleshooting Test Failures
- Ensure the project builds successfully before running tests (see the
buildskill). - Use
LOG_LEVEL=traceorLOG_LEVEL=debugfor more verbose output when diagnosing failures. - See the
troubleshootingskill for deeper diagnosis of runtime and test failures.