2022-12-28 16:01:40 +00:00
|
|
|
package tests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"path/filepath"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/ledgerwatch/log/v3"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestExecutionSpec(t *testing.T) {
|
|
|
|
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-08 13:01:35 +00:00
|
|
|
// Probably failing due to pre-Byzantium receipts
|
|
|
|
bt.skipLoad(`^frontier/`)
|
|
|
|
bt.skipLoad(`^homestead/`)
|
|
|
|
|
|
|
|
// TODO(yperbasis): fix me
|
|
|
|
bt.skipLoad(`^cancun/eip4844_blobs/`)
|
|
|
|
bt.skipLoad(`^cancun/eip6780_selfdestruct/`)
|
|
|
|
|
|
|
|
// TODO(yperbasis): re-enable checkStateRoot
|
|
|
|
checkStateRoot := false
|
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|