commit | 6a4bc8d17eb6703baf0c483fb40e0d3e1f0f6af3 | [log] [tgz] |
---|---|---|
author | Ryan Currah <ryan@currah.ca> | Tue Feb 25 15:51:56 2025 +0000 |
committer | Michael Matloob <matloob@golang.org> | Thu Mar 06 08:27:15 2025 -0800 |
tree | 05dab79dbcdad4eb868ba0eec76afb4f1ad631f0 | |
parent | 938b6c15e92e6a80b8368798a350a1a811487d88 [diff] |
cmd/go: cache coverage profile with tests This CL stores coverage profile data in the GOCACHE under the 'coverprofile' subkey alongside tests. This makes tests which use coverage profiles cacheable. The values of the -coverprofile and -outputdir flags are not included in the cache key to allow cached profile data to be written to any output file. Note: This is a rebase and squash from the original PRs below that was created/closed/abandoned by @jproberts and @macnibblet that I plan to maintain. - https://github.com/golang/go/pull/50483 - https://github.com/golang/go/pull/65657 I made improvements to the change based on feedback from @bcmills in Gerrit https://go-review.googlesource.com/c/go/+/563138. From @macnibblet: I don't know if anyone has considered the environmental impact (Yes, of course, dev experience too), but on a team with 3 backend developers, when I replaced our CI Golang version with this build, it reduced the build time by 50%, which would have equated to about 5000 hours of CI reduced in the past year. Fixes #23565 Change-Id: I59a20af5ea156f990a17544cf06dc667ae7f8aa3 GitHub-Last-Rev: a5a1d1b9c87ff433d16f656fc8988e1cb1ce7100 GitHub-Pull-Request: golang/go#69339 Reviewed-on: https://go-review.googlesource.com/c/go/+/610564 Reviewed-by: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@golang.org> Reviewed-by: Junyang Shao <shaojunyang@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attribution license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.