Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
build: add test cmd flag -v for verbose logs (ethereum#20298)
Browse files Browse the repository at this point in the history
Adds flags akin to -coverage flag enabling the test runner
to use go test's -v flag, signaling verbose test log output.
  • Loading branch information
meowsbits authored and elizabethengelman committed Dec 20, 2019
1 parent 36f409d commit 5a9ee5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,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()

Expand All @@ -334,6 +335,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)
Expand Down

0 comments on commit 5a9ee5e

Please sign in to comment.