2023-08-30 12:54:27 +00:00
|
|
|
//go:build integration
|
|
|
|
|
2022-12-28 16:01:40 +00:00
|
|
|
package tests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"path/filepath"
|
|
|
|
"testing"
|
|
|
|
|
2023-08-25 10:43:29 +00:00
|
|
|
"github.com/ledgerwatch/erigon/eth/ethconfig"
|
2022-12-28 16:01:40 +00:00
|
|
|
"github.com/ledgerwatch/log/v3"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestExecutionSpec(t *testing.T) {
|
2023-08-25 10:43:29 +00:00
|
|
|
if ethconfig.EnableHistoryV3InTest {
|
|
|
|
t.Skip("fix me in e3 please")
|
|
|
|
}
|
|
|
|
|
2022-12-28 16:01:40 +00:00
|
|
|
defer log.Root().SetHandler(log.Root().GetHandler())
|
|
|
|
log.Root().SetHandler(log.LvlFilterHandler(log.LvlError, log.StderrHandler))
|
|
|
|
|
|
|
|
bt := new(testMatcher)
|
|
|
|
|
|
|
|
dir := filepath.Join(".", "execution-spec-tests")
|
|
|
|
|
2023-08-25 06:06:59 +00:00
|
|
|
checkStateRoot := true
|
2023-08-08 13:01:35 +00:00
|
|
|
|
2022-12-28 16:01:40 +00:00
|
|
|
bt.walk(t, dir, func(t *testing.T, name string, test *BlockTest) {
|
|
|
|
// import pre accounts & construct test genesis block & state root
|
2023-08-08 13:01:35 +00:00
|
|
|
if err := bt.checkFailure(t, test.Run(t, checkStateRoot)); err != nil {
|
2022-12-28 16:01:40 +00:00
|
|
|
t.Error(err)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|