cmd/go: show -race if necessary when giving "go test -i" hint

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6851100
This commit is contained in:
Shenghou Ma 2012-11-23 19:29:22 +08:00
parent e126763045
commit f142deee95
1 changed files with 5 additions and 1 deletions

View File

@ -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)