Skip to content

Commit 124562b

Browse files
committed
Run go test -v only if -v flag is set
1 parent 1ca44b1 commit 124562b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/leeway/build.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,11 @@ func (p *Package) buildGo(buildctx *buildContext, wd, result string) (res *packa
12601260
}
12611261
var reportCoverage testCoverageFunc
12621262
if !cfg.DontTest && !buildctx.DontTest {
1263-
testCommand := []string{goCommand, "test", "-v"}
1263+
testCommand := []string{goCommand, "test"}
1264+
if log.IsLevelEnabled(log.DebugLevel) {
1265+
testCommand = append(testCommand, "-v")
1266+
}
1267+
12641268
if buildctx.buildOptions.CoverageOutputPath != "" {
12651269
testCommand = append(testCommand, fmt.Sprintf("-coverprofile=%v", codecovComponentName(p.FullName())))
12661270
} else {

0 commit comments

Comments
 (0)