mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
Merge 475e753926 into dddbaa4bf3
This commit is contained in:
commit
a0bbaf1a97
4 changed files with 48 additions and 15 deletions
|
|
@ -5,6 +5,11 @@
|
|||
# https://github.com/ethereum/execution-specs/releases/download/tests%40v20.0.0
|
||||
b183702a5b447b465873865357ced9eb342315922e52e31b714e2de115dd0bb4 fixtures.tar.gz
|
||||
|
||||
# version:spec-tests-bal glamsterdam-devnet@v7.1.0
|
||||
# https://github.com/ethereum/execution-specs/releases
|
||||
# https://github.com/ethereum/execution-specs/releases/download/tests-glamsterdam-devnet%40v7.1.0
|
||||
ba833a4c0a956bcc7d00118cd9aa817b8715ea4357ded9d3393d37ba89b182a9 fixtures_glamsterdam-devnet.tar.gz
|
||||
|
||||
# version:golang 1.25.12
|
||||
# https://go.dev/dl/
|
||||
f90dcee4bd023fa376374ea0a5a6ebe553537b39c426ffd8c689469b45519932 go1.25.12.src.tar.gz
|
||||
|
|
|
|||
20
build/ci.go
20
build/ci.go
|
|
@ -160,6 +160,9 @@ var (
|
|||
|
||||
// This is where the tests should be unpacked.
|
||||
executionSpecTestsDir = "tests/spec-tests"
|
||||
|
||||
// This is where the bal-specific release of the tests should be unpacked.
|
||||
executionSpecTestsBALDir = "tests/spec-tests-bal"
|
||||
)
|
||||
|
||||
var GOBIN, _ = filepath.Abs(filepath.Join("build", "bin"))
|
||||
|
|
@ -398,6 +401,7 @@ func doTest(cmdline []string) {
|
|||
// Get test fixtures.
|
||||
if !*short {
|
||||
downloadSpecTestFixtures(csdb, *cachedir)
|
||||
downloadBALSpecTestFixtures(csdb, *cachedir)
|
||||
}
|
||||
|
||||
// Configure the toolchain.
|
||||
|
|
@ -452,7 +456,7 @@ func doTest(cmdline []string) {
|
|||
// downloadSpecTestFixtures downloads and extracts the execution-spec-tests fixtures.
|
||||
func downloadSpecTestFixtures(csdb *download.ChecksumDB, cachedir string) string {
|
||||
ext := ".tar.gz"
|
||||
base := "fixtures"
|
||||
base := "fixtures_develop"
|
||||
archivePath := filepath.Join(cachedir, base+ext)
|
||||
if err := csdb.DownloadFileFromKnownURL(archivePath); err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
@ -463,6 +467,20 @@ func downloadSpecTestFixtures(csdb *download.ChecksumDB, cachedir string) string
|
|||
return filepath.Join(cachedir, base)
|
||||
}
|
||||
|
||||
// downloadBALSpecTestFixtures downloads and extracts the bal-specific execution-spec-tests fixtures.
|
||||
func downloadBALSpecTestFixtures(csdb *download.ChecksumDB, cachedir string) string {
|
||||
ext := ".tar.gz"
|
||||
base := "fixtures_glamsterdam-devnet"
|
||||
archivePath := filepath.Join(cachedir, base+ext)
|
||||
if err := csdb.DownloadFileFromKnownURL(archivePath); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if err := build.ExtractArchive(archivePath, executionSpecTestsBALDir); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return filepath.Join(cachedir, base)
|
||||
}
|
||||
|
||||
// doCheckGenerate ensures that re-generating generated files does not cause
|
||||
// any mutations in the source file tree.
|
||||
func doCheckGenerate() {
|
||||
|
|
|
|||
|
|
@ -82,8 +82,17 @@ func TestBlockchain(t *testing.T) {
|
|||
|
||||
// TestExecutionSpecBlocktests runs the test fixtures from execution-spec-tests.
|
||||
func TestExecutionSpecBlocktests(t *testing.T) {
|
||||
if !common.FileExist(executionSpecBlockchainTestDir) {
|
||||
t.Skipf("directory %s does not exist", executionSpecBlockchainTestDir)
|
||||
testExecutionSpecBlocktests(t, executionSpecBlockchainTestDir)
|
||||
}
|
||||
|
||||
// TestExecutionSpecBlocktestsBAL runs the BAL release test fixtures from execution-spec-tests.
|
||||
func TestExecutionSpecBlocktestsBAL(t *testing.T) {
|
||||
testExecutionSpecBlocktests(t, executionSpecBALBlockchainTestDir)
|
||||
}
|
||||
|
||||
func testExecutionSpecBlocktests(t *testing.T, testDir string) {
|
||||
if !common.FileExist(testDir) {
|
||||
t.Skipf("directory %s does not exist", testDir)
|
||||
}
|
||||
bt := new(testMatcher)
|
||||
|
||||
|
|
@ -95,7 +104,7 @@ func TestExecutionSpecBlocktests(t *testing.T) {
|
|||
bt.skipLoad(`.*eip7610_create_collision/initcollision/.*`)
|
||||
bt.skipLoad(`.*eip7610_create_collision/revert_in_create/.*`)
|
||||
|
||||
bt.walk(t, executionSpecBlockchainTestDir, func(t *testing.T, name string, test *BlockTest) {
|
||||
bt.walk(t, testDir, func(t *testing.T, name string, test *BlockTest) {
|
||||
execBlockTest(t, bt, test)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,17 +34,18 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
baseDir = filepath.Join(".", "testdata")
|
||||
blockTestDir = filepath.Join(baseDir, "BlockchainTests")
|
||||
stateTestDir = filepath.Join(baseDir, "GeneralStateTests")
|
||||
legacyStateTestDir = filepath.Join(baseDir, "LegacyTests", "Constantinople", "GeneralStateTests")
|
||||
transactionTestDir = filepath.Join(baseDir, "TransactionTests")
|
||||
rlpTestDir = filepath.Join(baseDir, "RLPTests")
|
||||
difficultyTestDir = filepath.Join(baseDir, "BasicTests")
|
||||
executionSpecBlockchainTestDir = filepath.Join(".", "spec-tests", "fixtures", "blockchain_tests")
|
||||
executionSpecStateTestDir = filepath.Join(".", "spec-tests", "fixtures", "state_tests")
|
||||
executionSpecTransactionTestDir = filepath.Join(".", "spec-tests", "fixtures", "transaction_tests")
|
||||
benchmarksDir = filepath.Join(".", "evm-benchmarks", "benchmarks")
|
||||
baseDir = filepath.Join(".", "testdata")
|
||||
blockTestDir = filepath.Join(baseDir, "BlockchainTests")
|
||||
stateTestDir = filepath.Join(baseDir, "GeneralStateTests")
|
||||
legacyStateTestDir = filepath.Join(baseDir, "LegacyTests", "Constantinople", "GeneralStateTests")
|
||||
transactionTestDir = filepath.Join(baseDir, "TransactionTests")
|
||||
rlpTestDir = filepath.Join(baseDir, "RLPTests")
|
||||
difficultyTestDir = filepath.Join(baseDir, "BasicTests")
|
||||
executionSpecBlockchainTestDir = filepath.Join(".", "spec-tests", "fixtures", "blockchain_tests")
|
||||
executionSpecBALBlockchainTestDir = filepath.Join(".", "spec-tests-bal", "fixtures", "blockchain_tests")
|
||||
executionSpecStateTestDir = filepath.Join(".", "spec-tests", "fixtures", "state_tests")
|
||||
executionSpecTransactionTestDir = filepath.Join(".", "spec-tests", "fixtures", "transaction_tests")
|
||||
benchmarksDir = filepath.Join(".", "evm-benchmarks", "benchmarks")
|
||||
)
|
||||
|
||||
func readJSON(reader io.Reader, value interface{}) error {
|
||||
|
|
|
|||
Loading…
Reference in a new issue