Skip to content

test: Register EEST fixtures as ctest tests per directory - #1705

Open
chfast wants to merge 1 commit into
masterfrom
test/eest-ctest-parallel-evmone-test
Open

chfast wants to merge 1 commit into
masterfrom
test/eest-ctest-parallel-evmone-test

Conversation

@chfast

@chfast chfast commented Sep 11, 2026

Copy link
Copy Markdown
Member

The execution-spec-test suites run as a single evmone test invocation over the whole fixture tree, so they execute serially on one core. EVMONE_SPEC_TESTS is a list of base directories scanned at configure time: the fixture directories three levels under state_tests / blockchain_tests become one ctest test each, so ctest --parallel spreads them over the cores. Empty by default, so normal builds register nothing.

The granularity is the whole point. Registering each fixture file — the obvious approach, and what this branch did before — is slower than the serial run it replaces, 0.45x on four cores, because ctest pays its per-test cost on a single thread whatever --parallel says: 8172 trivial tests take 25s at -j1 and 25s at -j32. Grouping by directory pays that cost 502 times instead of 8172 and gives roughly 4x on four cores, 55s down to 14s.

A tree shallower than three levels is registered at its leaves instead, so every fixture runs exactly once. That case is real: the develop fixtures are two levels deep, and a fixed three-level glob silently skipped 261 state and 380 blockchain files. Verified against four fixture releases that the registered directories cover every file exactly once, with no duplicates.

Tests are named by the path relative to the base directory, so fixtures from different sources stay distinct and are selectable with ctest -R; ctest -L state_tests selects a type. CI is not switched over here — that needs the download step to run before configure, and is worth its own change.

The execution-spec-test suites run as a single `evmone test` invocation
over the whole fixture tree, so they execute serially on one core. Add
EVMONE_SPEC_TESTS, a list of base directories scanned at configure time:
the fixture directories three levels under state_tests / blockchain_tests
become one ctest test each, labelled by type and named by the path
relative to the base. A tree shallower than that is registered at its
leaves, so every fixture runs exactly once. Empty by default, so normal
builds register nothing.

Registering each file instead is slower than the serial run it replaces,
because ctest pays its per-test cost on one thread whatever --parallel
says. Per directory it is up to ~4x faster on four cores.
@codspeed

codspeed Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 129 untouched benchmarks


Comparing test/eest-ctest-parallel-evmone-test (ac2ec11) with master (42a296c)

Open in CodSpeed

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.02%. Comparing base (42a296c) to head (ac2ec11).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1705   +/-   ##
=======================================
  Coverage   98.02%   98.02%           
=======================================
  Files         179      179           
  Lines       16357    16357           
  Branches     3765     3765           
=======================================
  Hits        16034    16034           
  Misses        243      243           
  Partials       80       80           
Flag Coverage Δ
eest-develop 82.78% <ø> (ø)
eest-develop-gmp 26.21% <ø> (ø)
eest-legacy 17.21% <ø> (ø)
eest-libsecp256k1 28.47% <ø> (ø)
eest-stable 82.75% <ø> (ø)
evmone-unittests 94.32% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 96.20% <ø> (ø)
tooling 94.06% <ø> (ø)
tests 99.81% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant