Add back verbose option when running CI tests

This commit is contained in:
Jianrong 2021-10-04 13:03:41 +11:00
parent fcbc5a28e1
commit 30811ee58c

View file

@ -214,10 +214,8 @@ func goToolArch(arch string, cc string, subcmd string, args ...string) *exec.Cmd
// "tests" also includes static analysis tools such as vet.
func doTest(cmdline []string) {
// var (
// coverage = flag.Bool("coverage", false, "Whether to record code coverage")
// )
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()
@ -241,6 +239,9 @@ func doTest(cmdline []string) {
if *coverage {
gotest.Args = append(gotest.Args, "-covermode=atomic", "-cover", "-coverprofile=coverage.txt")
}
if *verbose {
gotest.Args = append(gotest.Args, "-v")
}
gotest.Args = append(gotest.Args, packages...)
build.MustRun(gotest)