@@ -19,12 +19,11 @@ package main
1919import (
2020 "encoding/json"
2121 "errors"
22+ "fmt"
2223 "os"
2324
24- "github.com/ethereum/go-ethereum/core/state"
2525 "github.com/ethereum/go-ethereum/log"
2626 "github.com/ethereum/go-ethereum/tests"
27-
2827 "github.com/urfave/cli/v2"
2928)
3029
@@ -35,16 +34,6 @@ var blockTestCommand = &cli.Command{
3534 ArgsUsage : "<file>" ,
3635}
3736
38- // BlocktestResult contains the execution status after running a blockchain test, any
39- // error that might have occurred and a dump of the final blockchain if requested.
40- type BlocktestResult struct {
41- Name string `json:"name"`
42- Pass bool `json:"pass"`
43- Fork string `json:"fork"`
44- Error string `json:"error,omitempty"`
45- State * state.Dump `json:"state,omitempty"`
46- }
47-
4837func blockTestCmd (ctx * cli.Context ) error {
4938 if len (ctx .Args ().First ()) == 0 {
5039 return errors .New ("path-to-test argument required" )
@@ -63,9 +52,9 @@ func blockTestCmd(ctx *cli.Context) error {
6352 if err = json .Unmarshal (src , & tests ); err != nil {
6453 return err
6554 }
66- for _ , test := range tests {
55+ for i , test := range tests {
6756 if err := test .Run (false ); err != nil {
68- return err
57+ return fmt . Errorf ( "test %v: %w" , i , err )
6958 }
7059 }
7160 return nil
0 commit comments