aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/test/test.go
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2020-10-29 16:34:32 -0400
committerJay Conrod <jayconrod@google.com>2020-11-09 18:32:40 +0000
commit8a368c63ec2d48e1c8965341c982987de96164fd (patch)
tree3fa7f9a3b235552a370f1a59704236d9594001ee /src/cmd/go/internal/test/test.go
parent65607683f531e30071e450858ef6bdc283a0280c (diff)
downloadgo-8a368c63ec2d48e1c8965341c982987de96164fd.tar.gz
go-8a368c63ec2d48e1c8965341c982987de96164fd.zip
cmd/go: print deprecation messages for -i
build, install, and test will now print deprecation messages when the -i flag is used. clean will continue to support -i. For #41696 Change-Id: I956c235c487a872c5e6c1395388b4d6cd5ef817a Reviewed-on: https://go-review.googlesource.com/c/go/+/266368 Trust: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/internal/test/test.go')
-rw-r--r--src/cmd/go/internal/test/test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go
index 00da9770df..24601dc061 100644
--- a/src/cmd/go/internal/test/test.go
+++ b/src/cmd/go/internal/test/test.go
@@ -150,6 +150,7 @@ In addition to the build flags, the flags handled by 'go test' itself are:
-i
Install packages that are dependencies of the test.
Do not run the test.
+ The -i flag is deprecated. Compiled packages are cached automatically.
-json
Convert test output to JSON suitable for automated processing.
@@ -640,6 +641,7 @@ func runTest(ctx context.Context, cmd *base.Command, args []string) {
b.Init()
if cfg.BuildI {
+ fmt.Fprint(os.Stderr, "go test: -i flag is deprecated\n")
cfg.BuildV = testV
deps := make(map[string]bool)