Skip to content

Commit 6ca4231

Browse files
committed
execution: extract spec tests out of make test-all
1 parent 966348b commit 6ca4231

24 files changed

Lines changed: 258 additions & 643 deletions

File tree

.github/workflows/ci-gate.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
uses: ./.github/workflows/test-all-erigon-race.yml
4848
secrets: inherit
4949

50+
spec-tests:
51+
uses: ./.github/workflows/test-spec.yml
52+
secrets: inherit
53+
5054
hive:
5155
uses: ./.github/workflows/test-hive.yml
5256
secrets: inherit
@@ -95,6 +99,7 @@ jobs:
9599
- lint
96100
- tests
97101
- race-tests
102+
- spec-tests
98103
- hive
99104
- hive-eest
100105
- caplin

.github/workflows/test-all-erigon.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
- macos-15
1818
- windows-2025
1919
include:
20-
# eest_blockchain tests take ~1190s on the GitHub-hosted windows-2025
21-
# runner (right at the 20m limit). Give Windows extra headroom to avoid
22-
# marginal timeouts while keeping Linux/macOS at the tighter 20m.
20+
# Windows GitHub-hosted runners run noticeably slower than Linux for
21+
# this suite; give them extra headroom to avoid marginal timeouts
22+
# while keeping Linux/macOS at the tighter 20m.
2323
- os: windows-2025
2424
test_timeout: 30m
2525
skip_execution_tests: 'true'

.github/workflows/test-spec.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Spec tests
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
jobs:
12+
spec-tests:
13+
name: spec-${{ matrix.suite }}-${{ matrix.fixtures }}
14+
# Skip enginextests-devnet until the devnet tarball ships
15+
# blockchain_tests_engine_x/. The non-`_x` `blockchain_tests_engine/`
16+
# variant uses a different JSON schema (inline `pre`, no `preHash`)
17+
# that the cmd/evm enginextest runner cannot consume. Re-enable by
18+
# removing this guard once the fixture lands.
19+
if: ${{ !(matrix.suite == 'enginextests' && matrix.fixtures == 'devnet') }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- { suite: statetests, fixtures: stable, workers: 12, max-allowed-failures: 37 }
25+
- { suite: statetests, fixtures: devnet, workers: 12, max-allowed-failures: 5253 }
26+
- { suite: blocktests, fixtures: stable, workers: 12, max-allowed-failures: 0 }
27+
- { suite: blocktests, fixtures: devnet, workers: 12, max-allowed-failures: 6206 }
28+
- { suite: enginextests, fixtures: stable, workers: 8, max-allowed-failures: 0 }
29+
- { suite: enginextests, fixtures: devnet, workers: 8, max-allowed-failures: 0 }
30+
runs-on: ubuntu-24.04
31+
timeout-minutes: 60
32+
env:
33+
RAMDISK_SIZE_MB: '8192'
34+
35+
steps:
36+
- name: Declare runner
37+
run: echo "Runner $RUNNER_NAME"
38+
39+
- name: Checkout custom actions
40+
uses: actions/checkout@v6
41+
with:
42+
fetch-depth: 1
43+
44+
- uses: ./.github/actions/setup-erigon
45+
id: erigon
46+
with:
47+
submodules: false
48+
lfs: false
49+
cleanup-space: true
50+
ramdisk: true
51+
build-cache-extra-key: spec-${{ matrix.suite }}-${{ matrix.fixtures }}
52+
53+
- name: Cache test-fixtures tarballs
54+
uses: actions/cache@v4
55+
with:
56+
# Same key as test-all-erigon.yml so the two workflows share the
57+
# cache: tarballs are downloaded once per OS+manifest-hash and
58+
# restored here. Only the .tar.gz files are cached; extraction
59+
# happens fresh each run via tools/test-fixtures.sh.
60+
path: test-fixtures-cache/*.tar.gz
61+
key: test-fixtures-${{ runner.os }}-${{ hashFiles('test-fixtures.json') }}
62+
restore-keys: |
63+
test-fixtures-${{ runner.os }}-
64+
65+
- name: Run spec-${{ matrix.suite }}-${{ matrix.fixtures }}
66+
env:
67+
SPEC_MAX_FAILURES: ${{ matrix.max-allowed-failures }}
68+
SPEC_WORKERS: ${{ matrix.workers }}
69+
run: make spec-${{ matrix.suite }}-${{ matrix.fixtures }}
70+
71+
- uses: ./.github/actions/cleanup-erigon
72+
if: always()
73+
74+
# In the merge queue, cancel the run on first failure so the gate
75+
# doesn't stall waiting for still-running siblings. PR runs keep
76+
# going so authors see the full failure picture.
77+
- name: Cancel workflow run on failure
78+
if: failure() && github.event_name == 'merge_group'
79+
env:
80+
GH_TOKEN: ${{ github.token }}
81+
run: gh run cancel ${{ github.run_id }} || true

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,24 @@ test-fixtures:
248248
rm -rf test-fixtures-cache/cl_mainnet/tests/mainnet/eip7805
249249
rm -rf test-fixtures-cache/cl_mainnet/tests/mainnet/gloas
250250

251+
## test-fixtures-eest: download & extract EEST fixture tarballs only (subset of test-fixtures)
252+
.PHONY: test-fixtures-eest
253+
test-fixtures-eest:
254+
tools/test-fixtures.sh test-fixtures.json test-fixtures-cache eest_stable eest_devnet
255+
256+
# Spec tests: run cmd/evm runners (statetest, blocktest, enginextest) against
257+
# EEST fixtures. CI defines failure budgets in .github/workflows/test-spec.yml's
258+
# matrix.include:; local runs use the per-shard fallback defaults baked into
259+
# tools/run-spec-test.sh. Override either with SPEC_MAX_FAILURES / SPEC_WORKERS.
260+
SPEC_SHARDS := \
261+
statetests-stable statetests-devnet \
262+
blocktests-stable blocktests-devnet \
263+
enginextests-stable enginextests-devnet
264+
265+
.PHONY: $(addprefix spec-,$(SPEC_SHARDS))
266+
$(addprefix spec-,$(SPEC_SHARDS)): spec-%: test-fixtures-eest evm
267+
@bash tools/run-spec-test.sh $(subst -, ,$*)
268+
251269
## test-bench: check the benchmarks compile and run
252270
test-bench: override GO_FLAGS += -run=^$$ -bench=. -benchtime=1x -short -timeout=5m
253271
test-bench:

cmd/evm/enginexrunner.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ var engineXTestCommand = cli.Command{
5757
Usage: "Directory containing engine-x pre-alloc JSON files",
5858
Required: true,
5959
},
60+
&JSONOutputFlag,
6061
&RunFlag,
6162
&VerbosityFlag,
6263
&WorkersFlag,

db/kv/memdb/memory_database.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ func NewChainDB(tb testing.TB, tmpDir string) kv.RwDB {
4040

4141
func NewTestDB(tb testing.TB, label kv.Label) kv.RwDB {
4242
tb.Helper()
43-
// we can't use tb.TempDir() here becuase things like TestExecutionSpecBlockchain
44-
// produces test names that cause 'file name too long' errors
43+
// we can't use tb.TempDir() here because some tests produce names long
44+
// enough to cause 'file name too long' errors when reused as paths
4545
dirname, err := os.MkdirTemp("", "testdb-"+string(label)+"-*")
4646
if err != nil {
4747
tb.Fatal(err)

execution/execmodule/execmoduletester/exec_module_tester.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,8 @@ func New(tb testing.TB, opts ...Option) *ExecModuleTester {
416416
panic(err)
417417
}
418418
if tb != nil {
419-
// we can't use tb.TempDir() here becuase things like TestExecutionSpecBlockchain
420-
// produces test names that cause 'file name too long' errors
419+
// we can't use tb.TempDir() here because some tests produce names long
420+
// enough to cause 'file name too long' errors when reused as paths
421421
tb.Cleanup(func() {
422422
dir.RemoveAll(tmpdir)
423423
})

execution/tests/eest_blockchain/block_test.go

Lines changed: 0 additions & 67 deletions
This file was deleted.

execution/tests/eest_blockchain/testmain_test.go

Lines changed: 0 additions & 25 deletions
This file was deleted.

execution/tests/eest_cancun_blobs/block_test.go

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)