mirror of
https://github.com/golang/go
synced 2024-11-12 09:50:21 -07:00
cmd/dist: pass -tags race to go list in -race mode
so that runtime/race tests are included in the race builder. Update #14011. Change-Id: I04ac6e47366fdb1fe84ba89da556c6d38f7d4a47 Reviewed-on: https://go-review.googlesource.com/18686 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
5395846890
commit
97266969d8
6
src/cmd/dist/test.go
vendored
6
src/cmd/dist/test.go
vendored
@ -336,7 +336,11 @@ func (t *tester) registerTests() {
|
||||
} else {
|
||||
// Use a format string to only list packages and commands that have tests.
|
||||
const format = "{{if (or .TestGoFiles .XTestGoFiles)}}{{.ImportPath}}{{end}}"
|
||||
cmd := exec.Command("go", "list", "-f", format, "std")
|
||||
cmd := exec.Command("go", "list", "-f", format)
|
||||
if t.race {
|
||||
cmd.Args = append(cmd.Args, "-tags", "race")
|
||||
}
|
||||
cmd.Args = append(cmd.Args, "std")
|
||||
if !t.race {
|
||||
cmd.Args = append(cmd.Args, "cmd")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user