From f142deee959dbc753b23efc23f60bd755498ec3d Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Fri, 23 Nov 2012 19:29:22 +0800 Subject: [PATCH] cmd/go: show -race if necessary when giving "go test -i" hint R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/6851100 --- src/cmd/go/test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cmd/go/test.go b/src/cmd/go/test.go index a55ecb95d8..efd14609aa 100644 --- a/src/cmd/go/test.go +++ b/src/cmd/go/test.go @@ -379,7 +379,11 @@ func runTest(cmd *Command, args []string) { if args != "" { args = " " + args } - fmt.Fprintf(os.Stderr, "installing these packages with 'go test -i%s' will speed future tests.\n\n", args) + extraOpts := "" + if buildRace { + extraOpts = "-race " + } + fmt.Fprintf(os.Stderr, "installing these packages with 'go test %s-i%s' will speed future tests.\n\n", extraOpts, args) } b.do(root) -- 2.48.1