mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
make requested changes
This commit is contained in:
parent
96fbf667c2
commit
3060ae1c2f
1 changed files with 7 additions and 6 deletions
|
|
@ -20,11 +20,12 @@ import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/ethereum/go-ethereum/internal/flags"
|
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ethereum/go-ethereum/internal/flags"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/rawdb"
|
"github.com/ethereum/go-ethereum/core/rawdb"
|
||||||
"github.com/ethereum/go-ethereum/core/state"
|
"github.com/ethereum/go-ethereum/core/state"
|
||||||
|
|
@ -36,19 +37,19 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ForkFlag = &cli.StringFlag{
|
ForkFlag = &cli.StringFlag{
|
||||||
Name: "subtest.fork",
|
Name: "statetest.fork",
|
||||||
Usage: "The hard-fork to run the test against",
|
Usage: "The hard-fork to run the test against",
|
||||||
Category: flags.VMCategory,
|
Category: flags.VMCategory,
|
||||||
}
|
}
|
||||||
IdxFlag = &cli.IntFlag{
|
IdxFlag = &cli.IntFlag{
|
||||||
Name: "subtest.index",
|
Name: "statetest.index",
|
||||||
Usage: "The index of the subtest to run",
|
Usage: "The index of the subtest to run",
|
||||||
Category: flags.VMCategory,
|
Category: flags.VMCategory,
|
||||||
Value: -1, // default to select all subtest indices
|
Value: -1, // default to select all subtest indices
|
||||||
}
|
}
|
||||||
TestNameFlag = &cli.StringFlag{
|
TestNameFlag = &cli.StringFlag{
|
||||||
Name: "subtest.name",
|
Name: "statetest.name",
|
||||||
Usage: "The hard-fork to run the test against",
|
Usage: "The name of the state test to run",
|
||||||
Category: flags.VMCategory,
|
Category: flags.VMCategory,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -157,7 +158,7 @@ func runStateTest(ctx *cli.Context, fname string, cfg vm.Config, dump bool, benc
|
||||||
matchingTests := collectMatchedSubtests(ctx, testsByName)
|
matchingTests := collectMatchedSubtests(ctx, testsByName)
|
||||||
|
|
||||||
// Iterate over all the tests, run them and aggregate the results
|
// Iterate over all the tests, run them and aggregate the results
|
||||||
results := make([]StatetestResult, 0, len(testsByName))
|
var results []StatetestResult
|
||||||
for _, test := range matchingTests {
|
for _, test := range matchingTests {
|
||||||
// Run the test and aggregate the result
|
// Run the test and aggregate the result
|
||||||
result := &StatetestResult{Name: test.name, Fork: test.st.Fork, Pass: true}
|
result := &StatetestResult{Name: test.name, Fork: test.st.Fork, Pass: true}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue