From: Shenghou Ma Date: Fri, 23 Nov 2012 11:29:22 +0000 (+0800) Subject: cmd/go: show -race if necessary when giving "go test -i" hint X-Git-Tag: go1.1rc2~1820 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f142deee959dbc753b23efc23f60bd755498ec3d;p=gostls13.git cmd/go: show -race if necessary when giving "go test -i" hint R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/6851100 --- 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)