From b77fa876fabf2e490df0fd6b12157a0ca5e77ebe Mon Sep 17 00:00:00 2001 From: meows Date: Fri, 15 Nov 2019 11:02:30 -0500 Subject: [PATCH] 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. --- build/ci.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/ci.go b/build/ci.go index 55a632d3b248..17692a4d4372 100644 --- a/build/ci.go +++ b/build/ci.go @@ -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)