Skip to content

Commit cfa06c0

Browse files
committed
tests: Add flag to use EVMC for state tests
1 parent 8bbe720 commit cfa06c0

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"
@@ -68,8 +69,15 @@ func TestState(t *testing.T) {
6869
// Transactions with gasLimit above this value will not get a VM trace on failure.
6970
const traceErrorLimit = 400000
7071

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

0 commit comments

Comments
 (0)