Skip to content

[SharovBot] fix: RunTestMain should skip immediately when ERIGON_SKIP_EXECUTION_TESTS is set#20928

Merged
yperbasis merged 2 commits into
mainfrom
agent-fix/skip-execution-tests-runtest-main
May 4, 2026
Merged

[SharovBot] fix: RunTestMain should skip immediately when ERIGON_SKIP_EXECUTION_TESTS is set#20928
yperbasis merged 2 commits into
mainfrom
agent-fix/skip-execution-tests-runtest-main

Conversation

@erigon-copilot

Copy link
Copy Markdown
Contributor

[SharovBot]

Problem

Both execution/tests and execution/tests/eest_blockchain packages were timing out on the macos-15 CI runner (20 minute timeout) because the ERIGON_SKIP_EXECUTION_TESTS guard only lived inside testutil.TemporalDBWithDirs, which is called lazily per test. The TestMain-level RunTestMain had no such check, so all the slow state/blockchain spec-test suites would still start and run until the timeout fired.

Failing CI: https://github.com/erigontech/erigon/actions/runs/25155380978/job/73735755547

Error:

panic: test timed out after 20m0s
    running tests:
        TestState/stMemoryTest/buffer.json (1m27s)
        ...
FAIL    github.com/erigontech/erigon/execution/tests          1203.232s

panic: test timed out after 20m0s
    running tests:
        TestExecutionSpecBlockchain/osaka/eip7825_transaction_gas_limit_cap/...
FAIL    github.com/erigontech/erigon/execution/tests/eest_blockchain  1200.375s

Fix

Add an early os.Exit(0) at the top of RunTestMain when ERIGON_SKIP_EXECUTION_TESTS is set. This makes all 6 execution test packages exit cleanly and instantly on macOS/Windows CI runners:

  • execution/tests
  • execution/tests/eest_blockchain
  • execution/tests/eest_cancun_blobs
  • execution/tests/eest_frontier_scenarios
  • execution/tests/eest_osaka_clz
  • execution/tests/eest_prague_calldata

The macOS matrix entry already sets skip_execution_tests: 'true' which maps to the env var — the per-test skip inside TemporalDBWithDirs was just too late; tests were already allocated and running.

Testing

  • go build ./execution/tests/testutil/...
  • go vet ./execution/tests/testutil/...
  • No *_test.go files modified

…_EXECUTION_TESTS is set

Both execution/tests and execution/tests/eest_blockchain packages were
timing out on the macos-15 CI runner (20m timeout) because the
ERIGON_SKIP_EXECUTION_TESTS guard only lived inside TemporalDBWithDirs
(called lazily per test). The TestMain-level RunTestMain had no such
check, so all the slow state/blockchain spec-test suites would still
start and run until the timeout killed them.

Add an early os.Exit(0) at the top of RunTestMain when
ERIGON_SKIP_EXECUTION_TESTS is set. This makes all 6 execution test
packages (execution/tests, eest_blockchain, eest_cancun_blobs,
eest_frontier_scenarios, eest_osaka_clz, eest_prague_calldata) exit
cleanly and instantly on macOS/Windows CI runners.

Fixes CI job: tests / tests-mac-linux (macos-15)
Failure: https://github.com/erigontech/erigon/actions/runs/25155380978/job/73735755547

Co-authored-by: Giulio Rebuffo <giulio.rebuffo@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents long-running execution spec/state test suites from starting on CI runners where they are intentionally disabled, by adding an early ERIGON_SKIP_EXECUTION_TESTS check in the shared RunTestMain helper.

Changes:

  • Add an early os.Exit(0) in RunTestMain when ERIGON_SKIP_EXECUTION_TESTS is set.
  • Document the new TestMain-level skip behavior in testmain.go.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread execution/tests/testutil/testmain.go
Comment thread execution/tests/testutil/testmain.go Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@yperbasis yperbasis enabled auto-merge May 1, 2026 09:35
@yperbasis yperbasis added this pull request to the merge queue May 1, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 1, 2026
@yperbasis yperbasis added this pull request to the merge queue May 4, 2026
Merged via the queue into main with commit 12d6b49 May 4, 2026
38 checks passed
@yperbasis yperbasis deleted the agent-fix/skip-execution-tests-runtest-main branch May 4, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants