test: Move the fixture runners into evmone::testutils - #1676
Merged
Conversation
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1676 +/- ##
==========================================
+ Coverage 97.56% 97.86% +0.29%
==========================================
Files 174 176 +2
Lines 15876 15995 +119
Branches 3646 3666 +20
==========================================
+ Hits 15490 15654 +164
+ Misses 289 255 -34
+ Partials 97 86 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
chfast
force-pushed
the
test/runners-in-testutils
branch
from
August 26, 2026 14:40
375057b to
1913fbe
Compare
Both runners stopped needing gtest, so they can live in the library the tools already link instead of in the test binaries. run_state_test() is now defined next to the declaration in statetest.hpp rather than across the target boundary from it, and run_blockchain_tests() joins load_blockchain_tests() in blockchaintest.hpp, which retires blockchaintest_runner.hpp. evmone::testutils is built by EVMONE_TOOLS alone, where GTest is never fetched, so this is what lets the evmone CLI reach the runners later.
chfast
force-pushed
the
test/runners-in-testutils
branch
from
August 26, 2026 19:31
d0dc651 to
25c9084
Compare
There was a problem hiding this comment.
Pull request overview
Moves fixture runners into evmone::testutils, enabling tooling builds without GTest dependencies.
Changes:
- Relocates state and blockchain runners into testutils.
- Exposes the blockchain runner through
blockchaintest.hpp. - Adds direct unit coverage for runner failure paths.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
test/utils/statetest_runner.cpp |
Adds the relocated state-test runner. |
test/utils/CMakeLists.txt |
Builds both runners into testutils. |
test/utils/blockchaintest.hpp |
Declares the blockchain runner API. |
test/utils/blockchaintest_runner.cpp |
Uses the shared blockchain-test header. |
test/unittests/statetest_runner_test.cpp |
Tests state-runner failure reporting. |
test/unittests/blockchaintest_runner_test.cpp |
Tests validation, RLP, and state-reporting paths. |
test/unittests/CMakeLists.txt |
Registers the new unit tests. |
test/statetest/CMakeLists.txt |
Removes the runner from the executable sources. |
test/integration/statetest/tx/invalid_nonce.json |
Removes the migrated nonce fixture. |
test/integration/statetest/CMakeLists.txt |
Removes the migrated integration test. |
test/blockchaintest/CMakeLists.txt |
Removes locally compiled runner files. |
test/blockchaintest/blockchaintest.cpp |
Includes the shared runner declaration. |
test/blockchaintest/blockchaintest_runner.hpp |
Retires the redundant runner header. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
chfast
force-pushed
the
test/runners-in-testutils
branch
2 times, most recently
from
August 27, 2026 10:24
ee811cc to
3b9718a
Compare
The suites the coverage job runs, unit and integration, reach little of the runners: blockchaintest_runner.cpp sat at 61% lines, with validate_block()'s rejections and the state dumps never executed. EEST does reject blocks on a green run, but never reports a disagreement, so the verdicts below a rejection are unreachable from it. Both runners now live in evmone::testutils, which evmone-unittests links, so a test can drive them directly with a fixture broken on purpose. This lifts them to 75% and 96%. tx_invalid_nonce moves out of the integration tests, which keep the remaining cases as end-to-end smoke.
chfast
force-pushed
the
test/runners-in-testutils
branch
from
August 28, 2026 08:02
3b9718a to
2c0bc97
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
chfast
added a commit
that referenced
this pull request
Aug 28, 2026
`EVMONE_TESTING` defaults to `OFF`, and that is the only configuration where GTest is never fetched — but every job funnels through a `build` command that passes `-DEVMONE_TESTING=ON`, so the default has never been built in CI. Nothing would notice if the code built under `EVMONE_TOOLS` grew a dependency on GTest, which matters now that `evmone::testutils` carries the fixture runners and #1676 relies on them staying GTest-free. `gcc-min` and `clang-min` now configure the default first, build it, run `evmone run` once to check the tool works at all, and then reconfigure with testing on in the same directory. Measured locally: the first pass compiles 54 objects, the second 111, and **none of the 54 is recompiled** — 165 distinct in total, the same as a single testing-on build. So this costs an extra CMake configure and a smoke test, not a second build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that the runners no longer use gtest, they can live in
evmone::testutilsinstead of in thetest binaries.
statetest_runner.cppmoves unchanged;blockchaintest_runner.cpponly swaps itsown header for
blockchaintest.hpp, whererun_blockchain_tests()now sits next toload_blockchain_tests()— that retiresblockchaintest_runner.hpp.run_state_test()ends updefined in the same target as the
statetest.hppdeclaration it implements. The point is thebuild configuration:
evmone::testutilsis built byEVMONE_TOOLSalone, where GTest is neverfetched, so this is what lets the
evmoneCLI reach the runners later. Configuring withEVMONE_TOOLS=ON, EVMONE_TESTING=OFFbuilds both runner objects into testutils with no mention ofGTest; before this commit that configuration had no runners at all.
The second commit takes what the move enables. The suites the coverage job runs, unit and
integration, reach little of the runners:
blockchaintest_runner.cppsat at 61% line coverage,with
validate_block()'s rejections and the state dumps never executed. EEST does reject blockson a green run, but it never reports a disagreement, so the verdicts below a rejection are
unreachable from it.
evmone-unittestsalready links testutils, so five tests can nowdrive both runners directly with fixtures broken on purpose, taking the two files to 75% and 96%
lines and the blockchain runner to 100% of functions.
tx_invalid_noncemoves out of theintegration tests, where the remaining cases stay as end-to-end smoke; the unit version asserts on
the reported failure's fields rather than regex-matching a subprocess's output.