mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
build: add '-count' flag to doTest method
Adds flag -count to ci method doTest. This fla and value are passed directly to the 'go test' command.
This commit is contained in:
parent
3a4a3d080b
commit
72e9084ee2
1 changed files with 4 additions and 0 deletions
|
|
@ -319,6 +319,7 @@ func goToolArch(arch string, cc string, subcmd string, args ...string) *exec.Cmd
|
|||
func doTest(cmdline []string) {
|
||||
coverage := flag.Bool("coverage", false, "Whether to record code coverage")
|
||||
verbose := flag.Bool("v", false, "Whether to log verbosely")
|
||||
count := flag.Int("count", 0, "Run each test n times. Use '1' to idiomatically disable caching.")
|
||||
flag.CommandLine.Parse(cmdline)
|
||||
env := build.Env()
|
||||
|
||||
|
|
@ -338,6 +339,9 @@ func doTest(cmdline []string) {
|
|||
if *verbose {
|
||||
gotest.Args = append(gotest.Args, "-v")
|
||||
}
|
||||
if *count > 0 {
|
||||
gotest.Args = append(gotest.Args, fmt.Sprintf("-count=%d", *count))
|
||||
}
|
||||
|
||||
gotest.Args = append(gotest.Args, packages...)
|
||||
build.MustRun(gotest)
|
||||
|
|
|
|||
Loading…
Reference in a new issue