원클릭으로
test
Runs tests for the GenVM project. Use after making code changes to verify correctness.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Runs tests for the GenVM project. Use after making code changes to verify correctness.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Reviews the current GenVM branch by fanning out three specialized review agents (spec, security, implementation). Use when asked to "review this branch", "review the PR", or do a full code review of a diff.
Builds the GenVM project. Use after making code changes to compile Rust binaries.
GenVM Rust test conventions and style. Use when writing, adding, or modifying Rust tests — inline `#[cfg(test)] mod tests`, integration tests under a crate's `tests/`, helpers, assertions, and how `genvm-tool test` discovers them.
| name | test |
| description | Runs tests for the GenVM project. Use after making code changes to verify correctness. |
GenVM uses genvm-tool test for all tests. Before running tests, ensure the project is built (see /build skill).
Run all tests:
nix develop .#mock-tests --command genvm-tool test run
Run release tests (stable integration):
nix develop .#mock-tests --command genvm-tool test run --filter-tag "$(cat tests/presets/release.txt)"
Run a specific test:
nix develop .#mock-tests --command genvm-tool test run --filter-name 'test_name'
genvm-tool test run [OPTIONS]
Options:
| Flag | Description |
|---|---|
--filter-name REGEX | Filter tests by name regex |
--filter-tag EXPR | Filter tests by tags (e.g., stable & !slow) |
--filter-continue FILE | Re-run only tests from a continue file |
--fail-fast | Stop execution after first failure |
--coverage | Enable coverage collection for Rust tests |
--log-level LEVEL | Set log level (trace/debug/info/warning/error) |
--ignore-hash | Skip .hash (execution-hash) comparison entirely |
--ignore-hash: integration cases compare both the printed semantics
(.N.stdout) and a deterministic execution hash (.N.hash). When adding a new
case, you usually don't have a correct .hash yet — run with --ignore-hash so
only the .stdout semantics are checked, or set stable_hash: false on the
entry (then validators compare to the leader's hash instead of a committed file).
# Show available tests
genvm-tool test show test
# Show execution plan
genvm-tool test show plan
# Show available services
genvm-tool test show services
# Show available tags
genvm-tool test show tags
Presets are tag expressions stored in tests/presets/:
| Preset | Expression | Use Case |
|---|---|---|
release.txt | integration & stable | CI release tests |
rust.txt | rust | integration | Rust development |
python.txt | python | Python SDK tests |
Usage:
genvm-tool test --filter-tag "$(cat tests/presets/release.txt)" run
tests/cases/)End-to-end tests using jsonnet configuration. Services (manager, modules, webdriver) are started automatically.
nix develop .#mock-tests --command genvm-tool test run --filter-tag integration
Cargo tests for Rust crates:
nix develop .#rust-test --command genvm-tool test run --filter-tag rust
With coverage:
nix develop .#rust-test --command genvm-tool test run --filter-tag rust --coverage
Tests for the Python standard library (genlayer-py-std):
nix develop .#mock-tests --command genvm-tool test run --filter-tag python
Or directly with pytest from the standalone py-test flake (no nix develop needed):
cd runners/genlayer-py-std
env_dir="$(nix build --no-link --print-out-paths path:../../support/nix/py-test)"
PYTHONPATH="$PWD/src:$PWD/src-emb" "$env_dir/bin/pytest" tests/
Coverage: pytest is configured with --cov and --cov-fail-under=75. Coverage scope includes genlayer.types, genlayer.calldata, genlayer.storage, genlayer.evm, genlayer._internal, and genlayer_embeddings. Must run inside nix develop for numpy-dependent tests and correct coverage resolution.
For web-related tests (semi-stable/unstable), webdriver is started automatically by genvm-tool test. To manually start it:
bash modules/webdriver/build-and-run.sh
If WASM files or compilation changed, precompile to save test time:
./build/out/bin/genvm precompile
When tests fail, genvm-tool test writes failed test names to build/test-artifacts/continue/<timestamp>-<random>. Re-run only failed tests:
# Use filename shown in failure summary
genvm-tool test run --filter-continue 20260123-143052-abc123
| What to test | Command |
|---|---|
| All tests | nix develop .#mock-tests --command genvm-tool test run |
| Release tests | nix develop .#mock-tests --command genvm-tool test run --filter-tag "$(cat tests/presets/release.txt)" |
| Rust tests | nix develop .#rust-test --command genvm-tool test run --filter-tag rust |
| Python (direct) | cd runners/genlayer-py-std && PYTHONPATH="$PWD/src:$PWD/src-emb" "$(nix build --no-link --print-out-paths path:../../support/nix/py-test)/bin/pytest" tests/ |
| Re-run failed | genvm-tool test run --filter-continue <file> |
| With debug logs | nix develop .#mock-tests --command genvm-tool test run --log-level debug |
| Show test list | nix develop .#mock-tests --command genvm-tool test show test |