]> Cypherpunks repositories - gostls13.git/commit
internal/coverage/cformat: add aggregation option to EmitPercent
authorThan McIntosh <thanm@google.com>
Tue, 16 May 2023 17:06:22 +0000 (13:06 -0400)
committerThan McIntosh <thanm@google.com>
Tue, 23 May 2023 11:36:57 +0000 (11:36 +0000)
commit380529d5c371ac036c757a155453f618465ee8d3
treeef12e30a7f36a7d982879bc081198bc5c91c39e8
parent5cdc3874b0e44cecfadcf995091894eca978e558
internal/coverage/cformat: add aggregation option to EmitPercent

Add a flag to EmitPercent indicating to emit a single line percent
summary across all packages as opposed to a line per package. We need
to set this flag when reporting as part of a "go test -cover" run, but
false when reporting as part of a "go tool covdata percent" run.

Change-Id: Iba6a81b9ae27e3a5aaf9d0e46c0023c0e7ceae16
Reviewed-on: https://go-review.googlesource.com/c/go/+/495448
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/cmd/covdata/dump.go
src/internal/coverage/cformat/fmt_test.go
src/internal/coverage/cformat/format.go
src/runtime/coverage/testsupport.go
src/runtime/coverage/ts_test.go