Skip to content

Commit d935379

Browse files
committed
tests: Add flag to use EVMC for state tests
1 parent 58632d4 commit d935379

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/state_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package tests
1818

1919
import (
2020
"bytes"
21+
"flag"
2122
"fmt"
2223
"reflect"
2324
"testing"
@@ -65,8 +66,15 @@ func TestState(t *testing.T) {
6566
// Transactions with gasLimit above this value will not get a VM trace on failure.
6667
const traceErrorLimit = 400000
6768

69+
var testVMConfig = func() vm.Config {
70+
vmconfig := vm.Config{}
71+
flag.StringVar(&vmconfig.EVMInterpreter, "vm.evm", "", "External EVM configuration (default = built-in interpreter)")
72+
flag.Parse()
73+
return vmconfig
74+
}()
75+
6876
func withTrace(t *testing.T, gasLimit uint64, test func(vm.Config) error) {
69-
err := test(vm.Config{})
77+
err := test(testVMConfig)
7078
if err == nil {
7179
return
7280
}

0 commit comments

Comments
 (0)