mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
build: add test cmd flag -v for verbose logs
Adds flags akin to -coverage flag enabling the test runner to use go test's -v flag, signaling verbose test log output.
This commit is contained in:
parent
738b51ae31
commit
b77fa876fa
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")
|
||||
flag.CommandLine.Parse(cmdline)
|
||||
env := build.Env()
|
||||
|
||||
|
|
@ -335,6 +336,9 @@ func doTest(cmdline []string) {
|
|||
if *coverage {
|
||||
gotest.Args = append(gotest.Args, "-covermode=atomic", "-cover")
|
||||
}
|
||||
if *verbose {
|
||||
gotest.Args = append(gotest.Args, "-v")
|
||||
}
|
||||
|
||||
gotest.Args = append(gotest.Args, packages...)
|
||||
build.MustRun(gotest)
|
||||
|
|
|
|||
Loading…
Reference in a new issue