go/src/testing
Than McIntosh a85b8810c4 cmd/go: fix problems with coverage percentage reporting w/ -coverpkg
This patch resolves a set of problems with "percent covered" metrics
reported when the "-coverpkg" is in effect; these bugs were introduced
in Go 1.22 with the rollout of CL 495452 and related changes.
Specifically, for runs with multiple packages selected but without
-coverpkg, "percent covered" metrics were generated for package P not
based just on P's statements but on the entire corpus of statements.

Fixes #65570.

Change-Id: I38d61886cb46ebd38d8c4313c326d671197c3568
Reviewed-on: https://go-review.googlesource.com/c/go/+/592205
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2024-06-14 11:46:05 +00:00
..
fstest all: change from sort functions to slices functions where feasible 2024-05-23 01:00:11 +00:00
internal/testdeps cmd/go: fix problems with coverage percentage reporting w/ -coverpkg 2024-06-14 11:46:05 +00:00
iotest
quick
slogtest
allocs.go
allocs_test.go
benchmark.go all: change from sort functions to slices functions where feasible 2024-05-23 01:00:11 +00:00
benchmark_test.go all: change from sort functions to slices functions where feasible 2024-05-23 01:00:11 +00:00
cover.go
example.go all: change from sort functions to slices functions where feasible 2024-05-23 01:00:11 +00:00
export_test.go testing: use QueryPerformanceCounter on Windows 2024-04-26 22:55:25 +00:00
flag_test.go
fuzz.go testing: use QueryPerformanceCounter on Windows 2024-04-26 22:55:25 +00:00
helper_test.go testing: use subprocesses in TestTBHelper and TestTBHelperParallel 2023-11-21 17:24:47 +00:00
helperfuncs_test.go testing: use subprocesses in TestTBHelper and TestTBHelperParallel 2023-11-21 17:24:47 +00:00
match.go
match_test.go
newcover.go internal/coverage/cfile: remove //go:linkname into testing 2024-05-22 09:58:07 +00:00
panic_test.go Revert "testing: simplify concurrency and cleanup logic" 2023-11-27 16:49:24 +00:00
run_example.go
run_example_wasm.go
sub_test.go testing: add regression tests for reentrant calls to T.Run 2023-12-01 21:27:08 +00:00
testing.go all: change from sort functions to slices functions where feasible 2024-05-23 01:00:11 +00:00
testing_other.go testing: use time.Since in highPrecisionTime 2024-04-27 19:42:36 +00:00
testing_test.go runtime: properly frame panic values in tracebacks 2024-05-08 19:10:41 +00:00
testing_windows.go testing: use QueryPerformanceCounter on Windows 2024-04-26 22:55:25 +00:00
testing_windows_test.go testing: use QueryPerformanceCounter on Windows 2024-04-26 22:55:25 +00:00