mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
tests: split up state test execution
This commit is contained in:
parent
817553cc28
commit
96017c248c
1 changed files with 38 additions and 29 deletions
|
|
@ -35,7 +35,24 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/eth/tracers/logger"
|
"github.com/ethereum/go-ethereum/eth/tracers/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestState(t *testing.T) {
|
func TestStateCurrent(t *testing.T) {
|
||||||
|
testState(t, stateTestDir)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestStateLegacy(t *testing.T) {
|
||||||
|
// For Istanbul, older tests were moved into LegacyTests
|
||||||
|
testState(t, legacyStateTestDir)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestStateBenchmarks(t *testing.T) {
|
||||||
|
testState(t, benchmarksDir)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestStateFuture(t *testing.T) {
|
||||||
|
testState(t, filepath.Join(baseDir, "EIPTests", "StateTests"))
|
||||||
|
}
|
||||||
|
|
||||||
|
func testState(t *testing.T, dir string) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
st := new(testMatcher)
|
st := new(testMatcher)
|
||||||
|
|
@ -66,13 +83,6 @@ func TestState(t *testing.T) {
|
||||||
st.fails(`stEIP4844-blobtransactions/opcodeBlobhashOutOfRange.json`, "test has incorrect state root")
|
st.fails(`stEIP4844-blobtransactions/opcodeBlobhashOutOfRange.json`, "test has incorrect state root")
|
||||||
st.fails(`stEIP4844-blobtransactions/opcodeBlobhBounds.json`, "test has incorrect state root")
|
st.fails(`stEIP4844-blobtransactions/opcodeBlobhBounds.json`, "test has incorrect state root")
|
||||||
|
|
||||||
// For Istanbul, older tests were moved into LegacyTests
|
|
||||||
for _, dir := range []string{
|
|
||||||
filepath.Join(baseDir, "EIPTests", "StateTests"),
|
|
||||||
stateTestDir,
|
|
||||||
legacyStateTestDir,
|
|
||||||
benchmarksDir,
|
|
||||||
} {
|
|
||||||
st.walk(t, dir, func(t *testing.T, name string, test *StateTest) {
|
st.walk(t, dir, func(t *testing.T, name string, test *StateTest) {
|
||||||
for _, subtest := range test.Subtests() {
|
for _, subtest := range test.Subtests() {
|
||||||
subtest := subtest
|
subtest := subtest
|
||||||
|
|
@ -97,7 +107,6 @@ func TestState(t *testing.T) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transactions with gasLimit above this value will not get a VM trace on failure.
|
// Transactions with gasLimit above this value will not get a VM trace on failure.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue