test: Collect the test files in one place - #1680
Merged
Merged
Conversation
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1680 +/- ##
==========================================
+ Coverage 97.86% 97.93% +0.06%
==========================================
Files 176 178 +2
Lines 15995 15995
Branches 3666 3664 -2
==========================================
+ Hits 15654 15664 +10
+ Misses 255 252 -3
+ Partials 86 79 -7
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/collect-test-files
branch
9 times, most recently
from
August 29, 2026 10:52
1ff008c to
10a57b2
Compare
There was a problem hiding this comment.
Pull request overview
Centralizes JSON fixture discovery for both test runners and expands integration coverage.
Changes:
- Adds shared, sorted test-file collection.
- Updates state and blockchain test registration.
- Adds filtering, directory, tracing, and unsupported-fixture coverage.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test/utils/test_files.hpp |
Declares shared test discovery API. |
test/utils/test_files.cpp |
Implements filtered, sorted recursive discovery. |
test/utils/CMakeLists.txt |
Builds the new utility. |
test/statetest/statetest.cpp |
Uses shared discovery. |
test/blockchaintest/blockchaintest.cpp |
Uses shared discovery. |
test/integration/statetest/CMakeLists.txt |
Expands integration coverage. |
test/integration/statetest/tests1/SuiteA/index.json |
Tests index exclusion. |
test/integration/statetest/tests1/SuiteA/notes.txt |
Tests non-JSON exclusion. |
test/integration/blockchaintest/CMakeLists.txt |
Adds directory and error-path tests. |
test/integration/blockchaintest/unsupported_rlp.json |
Exercises unsupported block fixtures. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Both drivers walked the directory themselves, with the same recursive search, the same index.json skip, the same sort and the same suite naming written out twice. Only the registration at the end differed. collect_test_files() in testutils does the walk once and returns each file with the suite it belongs to. The listed tests are unchanged, name for name: 20245 for the state tool and 21333 for the blockchain one, in the same order. The integration tests grow to cover the paths they were missing. The blockchain tool was only ever given single files, so the whole directory form went unrun; SuiteA gains files that must not be collected; and a fixture with an unsupported block shape exercises both places that shape is reported. Coverage of blockchaintest.cpp goes from 61% to 97% of lines, and of the collector to 100%.
chfast
force-pushed
the
test/collect-test-files
branch
from
August 29, 2026 14:44
10a57b2 to
4c1edc9
Compare
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.
Both drivers walked the test directory themselves, and the two walks were the same code: the
recursive search, the
.jsonfilter, theindex.jsonskip, the sort, and the suite name takenfrom the file's directory relative to the root. Only the registration at the end differed.
collect_test_files()does it once.--gtest_list_testsover the EEST fixtures staysbyte-identical to master, 20245 names for the state tool and 21333 for the blockchain one, in the
same order.
The integration tests grow to cover what they were missing, each addition checked to raise the
covered-line count on its own: the blockchain tool had only ever been given single files, so the
whole directory form went unrun;
SuiteAgains anindex.jsonand anotes.txt, which theexisting
tests1_listexpectation would show if either were collected; a fixture with a blockshape the loader rejects covers both places that is reported; and
-kover a directory isfiltered per case rather than at registration.
blockchaintest.cppgoes from 61% to 97% of linesand 100% of branches,
test_files.cppto 100% throughout.