From 190fb8180a62c2372db60e2ffe70363f079b41d6 Mon Sep 17 00:00:00 2001 From: meowsbits <45600330+meowsbits@users.noreply.github.com> Date: Mon, 18 Nov 2019 09:48:20 -0500 Subject: [PATCH] build: add test cmd flag -v for verbose logs (#20298) 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 f4d336b64..163520241 100644 --- a/build/ci.go +++ b/build/ci.go @@ -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() @@ -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)