test: Add the evmone test command - #1685
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1685 +/- ##
==========================================
+ Coverage 98.00% 98.02% +0.01%
==========================================
Files 180 179 -1
Lines 16288 16317 +29
Branches 3736 3760 +24
==========================================
+ Hits 15963 15994 +31
+ Misses 247 243 -4
- Partials 78 80 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a unified evmone test command for state and blockchain fixtures.
Changes:
- Adds lazy fixture collection, classification, filtering, and execution.
- Exposes per-case state and blockchain loaders.
- Updates empty/skipped-run exit semantics and integration coverage.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tools/evmone/main.cpp |
Adds the test subcommand. |
test/utils/test_driver.hpp |
Defines the nothing-verified exit code. |
test/utils/test_driver.cpp |
Handles fully skipped runs. |
test/utils/test_collector.hpp |
Declares collection settings and API. |
test/utils/test_collector.cpp |
Classifies and runs mixed fixtures. |
test/utils/statetest.hpp |
Exposes single-case loading. |
test/utils/statetest_runner.cpp |
Documents empty-post behavior. |
test/utils/statetest_loader.cpp |
Implements single-case loading. |
test/utils/CMakeLists.txt |
Builds the collector. |
test/utils/blockchaintest.hpp |
Exposes single-case loading. |
test/utils/blockchaintest_loader.cpp |
Publishes the case loader. |
test/unittests/test_driver_test.cpp |
Tests skipped-run semantics. |
test/integration/testcmd/one_unsupported_case.json |
Covers mixed supported and unsupported cases. |
test/integration/testcmd_fault/unrecognised_case.json |
Covers malformed fixture cases. |
test/integration/testcmd_cases/case_after_exception.json |
Covers continuation after exceptions. |
test/integration/CMakeLists.txt |
Adds command-level integration tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
2cfb252 to
3460a62
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (1)
test/utils/test_collector.cpp:152
- When
-kmatches no cases in a directory, every collected file returns normally and is counted as passed, so the command exits successfully despite executing no fixture. This also makes filtering behavior depend on whether the same fixture was named as a file (which correctly returnsNOTHING_VERIFIED). Mark a file with no runnable selected cases as skipped so an empty directory selection propagatesNOTHING_VERIFIED.
// A fixture file in which this tool ran nothing it was asked for is skipped, not passed.
// TODO: A file whose cases -k all deselected still passes, as it did before this command
// existed, so a filter which matches nothing reports a tree of passing tests. Skip it
// instead, and an empty selection reaches NOTHING_VERIFIED on its own.
if (!any_ran && !declined.empty())
throw UnsupportedTestFeature{declined.front().second};
0080993 to
cdc9e3d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
test/utils/test_collector.cpp:148
- With a directory root,
-kmatching no case leaves each collected file as passed, so the command exits successfully despite verifying nothing; the same filter on a named file correctly returnsNOTHING_VERIFIED. Treat a fixture file where no selected case ran as skipped so an entirely empty selection produces the non-success exit code.
// A fixture file in which this tool ran nothing it was asked for is skipped, not passed.
// TODO: A file whose cases -k all deselected still passes, as it did before this command
// existed, so a filter which matches nothing reports a tree of passing tests. Skip it
// instead, and an empty selection reaches NOTHING_VERIFIED on its own.
if (!any_ran && !declined.empty())
throw UnsupportedTestFeature{declined.front().second};
e9d827d to
1d8a9ca
Compare
81b6c18 to
4686ff5
Compare
980a2f6 to
1753600
Compare
30bcb79 to
8bd39be
Compare
2de15f9 to
5b4e907
Compare
df1279e to
4fd3a05
Compare
One `evmone test` command runs both state and blockchain fixtures, deciding which format each fixture is when it runs it: `_info.fixture-format` names it, and a fixture without one is recognised by the shape only that format has. What the tool cannot run is treated three ways, because a fixture directory holds more than fixtures. A format it does not run, engine fixtures above all, is skipped. A file holding no fixture at all is skipped whole, which is what EEST's shared pre-allocation is. Anything else it cannot recognise, in a file whose other fixtures are tests, is a fault in the file and fails. A file is still one test, but reports one result per fixture in it. evmone-statetest and evmone-blockchaintest are deleted, and CI runs the fixtures through the one command instead. Claude-Session: https://claude.ai/code/session_016UHPAGwcwXMjqhTLpT31K7
4fd3a05 to
3ff0279
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The unified runner behavior, reporting semantics, migration, and key failure paths are consistently covered with no unresolved blocking issue found.
Review details
- Files reviewed: 30/30 changed files
- Comments generated: 0 new
- Review effort level: Balanced
One
evmone testcommand runs both state and blockchain fixtures, deciding which format each fixture is when it runs it:_info.fixture-formatnames it, and a fixture without one is recognised by the shape only that format has.What the tool cannot run is treated three ways, because a fixture directory holds more than fixtures. A format it does not run, engine fixtures above all, is skipped. A file holding no fixture at all is skipped whole, which is what EEST's shared pre-allocation is. Anything else it cannot recognise, in a file whose other fixtures are tests, is a fault in the file and fails.
A file is still one test, but reports one result per fixture in it.
evmone-statetest and evmone-blockchaintest are deleted, and CI runs the fixtures through the one command instead.